I’m learning through Unity Learn to make games in Unity, and I’m finally starting to catch on to using C#. Unfortunately, I ran into a problem with my code. I’m making a game with customers walking up to a register, and I need them to spawn from a random set of coordinates and walk to a set point.
I’ve tried using code I made in the past, while also looking at a few different tutorials and tips, all of it ending with the same result. I need them to spawn between ((-7, 5), 7.8, -18) and move to (-1, 7.8, -7.8). No matter what I try, the customers spawn in the air and float to above the point they need to go to. It seems to be doubling the coordinate numbers, yet they do exactly the same thing if I cut the numbers in half. I thought it might help if I added a rigidbody, yet that only caused the customer to fall endlessly when reaching what they thought was point B. Any suggestions?
carterbuddy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.