Hi guys,
I'm using this code:
transform.rotation = Quaternion.Slerp(transform.rotation, originalRotationValue, Time.time * rotationResetSpeed);
which works great.
However, originalRotationValue returns back to 0, which makes sense as in Start() we have:
originalRotationValue = transform.rotation;
The problem is I need to keep the originalRotationValue.y where it's currently at.
Not rotate back to 0.
Can you please help?
Thanks!
↧