How to reset the object's rotation to (0,0,0)?
I want to manually tilt the object and automatically reset it's rotation to (0,0,0). Many people used obj.transform.rotation = Quaternion.identity;
but it's like (30,0,0) -> (0,0,0). That's not what I want. I want to reset the rotation like (30,0,0) -> (29.9,0,0) -> (29.8,0,0) -> ... -> (0,0,0). How can I do?
Smoothly resetting it? Slerp to the identity rotation using Quaternion.Slerp.
Answer by GasPla · Jun 22, 2017 at 11:35 PM
Simply setting the rotation to a new value will change the object's rotation immediately that frame, rather than doing so gradually over time (after all, how could you determine how fast it would rotate, given your code?).
You'll want to look into using a Coroutine, if you're looking do a certain operation over multiple frames.
Your answer
![](https://koobas.hobune.stream/wayback/20220612124653im_/https://answers.unity.com/themes/thub/images/avi.jpg)