Hey all,
I have a game where an object of mine with a rigidbody rotates into the ideal position for the direction it's facing.
Here is the code:
float my_Aerodynamic = 0.2f;
my_Rigidbody.rotation = Quaternion.Slerp(my_Rigidbody.rotation, Quaternion.LookRotation(my_Rigidbody.velocity, transform.up), my_Aerodynamic*Time.deltaTime);
Slerp does not provide the desired transition. The object rotates at a constant speed toward the ideal rotation. I need a smooth transition that starts slow, speeds up over time, then slows down again. What can I use to get that curve transition effect?
↧