There is an object marked where before where is the butt. All is well. If attached with it

myTransform.Translate(Vector3.forward); 

He moves "face" forward. If it is deployed, it moves in the same face, i.e. changes direction after turn. If you do instead of just moving physics

 rb.AddForce(Vector3.forward*120) 

(120 in order for the body to have enough power. Without this multiplier, it does not move at all. Heavy) Then it moves as it moved - that is, first face forward and after turning - face back. The direction does not change from the turn.

The question is how to make it change. So that the rigid body always moves face forward with a given impulse and force.

    1 answer 1

    Moving forward is done using the transform.forward property — this property determines in front of the object relative to the object itself.

    In order for the body to move all the time with a certain force, it is necessary to use the ConstantForce component. Set the values ​​you need and use it as intended.

    In order not to multiply Vector3.forward - you need to configure the Rigidbody itself, namely its mass. The Vector3.forward * 120 expression is equivalent to the new Vector3(120, 0, 0) expression new Vector3(120, 0, 0) .

    For a greater understanding of the concept of physics in Unity, you must complete the following courses: http://unity3d.com/ru/learn/tutorials/topics/physics

    I also recommend following the Unity online courses on their official website: http://unity3d.com/ru/learn/live-training