- Home /
Quaternion.Slerp only one axis?
I have a plane (2d image) and I have him going between 3 points, and he has a flashlight. So naturally I want the flashlight to be facing where he is moving. I have tried Slerp and LookAt(target) but every time it updates a bunch of other axis, which makes my plane disappear. I have tried freezing the rotation, but no luck.
How do I make my plane rotate on just the y axis?
this.transform.Rotate(0, 90,0, Space.Self); --works but it doesn't provide me with the math I need.
(I have tried looking at http://unity3d.com/support/documentation/ScriptReference/Transform-rotation.html but it was no help, as I don't provide any input)
Answer by DaveA · Sep 08, 2011 at 08:08 PM
Look at Mathf.Slerp. Also http://www.unifycommunity.com/wiki/index.php?title=Angle
@DaveA thanks! but i don't see a $$anonymous$$athf.Slerp...
Your answer
Follow this Question
Related Questions
Use Lerp to rotate object 2 Answers
How can you make a nav mesh agent rotate 180 degrees? 1 Answer
How do I rotate on World Axes with Quaternion.Slerp? 2 Answers
Quaternion Slerp is making me mad 2 Answers
Quaternion.slerp rotates instantly. 2 Answers