- Home /
Question by
smirlianos · Oct 22, 2013 at 12:53 PM ·
rotationquaternionaxislookrotationquaternion.lookrotation
Quaternion.LookRotation only on Y axis
Hello,
I make a game and sometime the player (character controller) uses "Quaternion.LookRotation" to lock his view on a gameObject. However, if the gameObject is below or above him, it changes the player controller's rotation and he's not vertical to the ground any more.
My question is: How can I use Quaternion.LookRotation to affect only the Y axis?
Thanks!
Comment
Your answer
Follow this Question
Related Questions
Rotating a 2D sprite to face a target on a single axis. 3 Answers
90 Degree stopping rotation on y-axis issue 0 Answers
to rotate along z axis 1 Answer