Answers for "how to add velocity to your rotation in unity"

C#
1

set rotation to velocity unity

transform.rotation = Quaternion.LookRotation(rigidbody.velocity);
Posted by: Guest on April-12-2020
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

Code answers related to "how to add velocity to your rotation in unity"

C# Answers by Framework

Browse Popular Code Answers by Language