unity 3d car movment

Hello guys,

New here at unity,

I’m trying to a 3d car game and I want it to go only in one direction without it rotate or go to the sides like follow a path.

How can I make it I managed to make a car controller with acceleration and everything but how can i make my car move only in one direction without it moving left or right?

Thanks.

Regardless of direction, the field transform.forward is always a vector that points in the +Z direction of your transform. You can use this to move always in the direction that you are facing.