So here’s what’s going on…
I have followed everything perfectly up to Lecture 25 except for the layout of the scene, and the number of Customers and Packages (red and yellow respectively), and suddenly, with no reason as far as I can see, when I attempt to play the game, The Car, the Customers, and the Packages, start travelling directly up the Y axis (while staying in the position I deliberately put them as you can see). I have looked through everything and I’m still totally confused.
Hi Thesair,
When something like this happens, the first thing I check is the camera. The camera must not have a Rigidbody2D or a Collider2D attached. Then I would check the environment (roads, houses, and so on). The roads must not have a Rigidbody2D or a Collider2D attached. The houses may have a Collider2D but no Rigidbody2D.
Then I would check the packages. They may have a Collider2D but no Rigidbody2D.
None of these game objects may have our movement script. Only the car may have it.
When game objects with colliders suddenly start moving, it might be that they are inside a big collider. That’s why I asked you to checked everything.
Did this help?
See also:
- Forum User Guides : How to mark a topic as solved
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.