(UNITY3D) Get slerp to work just as LookAt(,Vector3.right) does
- by Ben Rokah
Ive been working over a sidescroller shooter game. Ive got my sidescroller shooter character to look around with these :
chest.LookAt(mousepos,Vector3.right);
&
chest.LookAt(mousepos,Vector3.left);
(Left when the character is turned to the left and right when the character is turned to the right)
so it wont aim in to any other axis... But when the mouse gets to cross the middle of the character and not around it it gets the rotation to make a small transportation between frames and it wont get all the way to there.. It'll just teleport to its correct rotation like lookat should.
Well the question is, how do I get any quaternion slerp which works with a Time.deltTime to work as same as LookAt(,Vector3.right)? I must have the Vector3.right and left so it'll move trough 1 axis.
Many thanks to anyone who helps me out. :)