- Home /
How to animate car movement without player input \ 2D TOP DOWN GAME
I need to make the car move straight with the help of the script, then after a couple of seconds it turns to the right and then to the left
Answer by swanne · Nov 30, 2021 at 03:26 PM
Your title and description are two different questions.
To animate your car without player input, create the animation and have that as the default state so it plays on game start.
To move your car without player input, create a script that moves the game object either my manipulating the transform component or the rigidbody component, choice is yours, and call it in the start function of the script.
Also, if you want to move the car right and left and wherever else at set points you could use an array of empty transforms to map out the movement route and have the car move to each one.