Question by
Augusts96 · Jan 12, 2017 at 05:18 AM ·
lerprotation axisslerp
How to Slerp / Lerp Rotation on a Single Axis?
So I am trying to smooth out the rotation only on the Y axis.
This works perfectly fine but rotates all 3 axis.
transform.rotation = Quaternion.Slerp(transform.rotation, mainCamera.rotation, Time.time * 0.1f);
I try to rotate only around Y like so:
transform.rotation.y = Quaternion.Slerp(transform.rotation.y, mainCamera.rotation.y, Time.time * 0.1f);
But then I receive the following errors:
Any help on how I can make this work?
Thanks!
untitled.png
(15.3 kB)
untitled.png
(15.3 kB)
Comment
Your answer
Follow this Question
Related Questions
How to control rocket pathing with Quaternion.Slerp 1 Answer
Rotate on Transform.localeulerAngels smoothly 0 Answers
Lerp going crazy when negative 1 Answer
How to open and close a door 0 Answers