How would I create a smoothed out rotation for an object? By this I basically mean when I press a button, it eases into the movement - doesn’t just jump right into the turning.
In case you need it, the script I currently am using for a simple rotate is:
var roll = -Input.GetAxis ("Roll") * rollSpeed;
transform.Rotate (Vector3.forward * roll * Time.deltaTime);
Thanks in advance.
You could use a rigidbody, set the angular drag parameter appropriately, and then apply torque to effect turning; this will most likely give you the effect you’re looking for.
If you want to do it manually, you can use an ‘angular velocity’ variable. When the corresponding key is down, adjust the angular velocity by applying the appropriate acceleration; otherwise, apply deceleration. Then, rotate manually using Transform.Rotate() and the current angular velocity.