Answers for "How to add velocity in local rotation unity"

0

How to add velocity in local rotation unity

Vector3 forwardVel = transform.forward * speed * moveVertical;
 Vector3 horizontalVel = transform.right * speed * moveHorizontal;
 
 rigidbody.velocity = forwardVel + horizontalVel;
Posted by: Guest on May-16-2021

Browse Popular Code Answers by Language