- Home /
Issue with lerping to negative.
Hi,
i got an issue with lerping it seems when I lerp to a negative number (start at y=0 go to y=-90) slerp likes to only move by positive numbers so basically doing to 270 instead of -90
thanks in advance, Aaron
$$anonymous$$ake an angle variable, lerp it and then apply to the rotation.
first of all in eular angles (which you should be working with for coding such problem) there is no such thing as negative 90 degrees. rotation numbers go from 0 to 360. negative 90 degrees is actually 270. so you will be garanteed wierd results assigning negative numbers. in code there are simple corrections for this. weather this is or is not your problem please post your code and it seems we can help you make an easy fix for you.......show your code!
Save the current rotation of the camera. Duplicate it and rotate it by 90 degrees. Slerp the Quaternions.
I am having a hard time reproducing this issue. Could you post some code for us to look at. It would help us help you better.
Your answer
Follow this Question
Related Questions
How to create a panning, rotating camera with Cinemachine Freelook camera? 0 Answers
Unity - Dancing Ball World camera following and rotating system 1 Answer
Would anyone teach me how to create camera movement and look controls? 2 Answers
Cinemachine input axis camera movement,cinemachine input axis control with script 1 Answer
I only rotated X, but Y and Z are shifting as well when I play the game. 1 Answer