Using addforce to a rigidbody with vector3.right causes it to move right, even if it is rotated. My question is, how can you get the rigidbody to move from its angle. For example:
and not:
Using addforce to a rigidbody with vector3.right causes it to move right, even if it is rotated. My question is, how can you get the rigidbody to move from its angle. For example:
and not:
Use AddRelativeForce rather than AddForce. AddForce uses the global coordinate system, AddRelativeForce is local to the target object.
var force : Vector3;
gameObject.rigidbody.AddRelativeForce(force);