Hello everyone.
I'm using GSAP to rotate a Three.js camera in my app.
I have no problem if I want to go from 20 degrees rotation to 270 degrees.
But if I want to go from 270 degrees to 20, I don't want the camera to go backwards, instead I prefer it starts from 270 going to 360 and then from 1 to 20.
I already achieved this by making an array with all the numbers from 270>360 + 1>20 and then use this array on the onUpdate function to rotate the camera, however, this doesn't give me a smooth result. (I attached the code)
Can anyone help me with a solution for this?
Thank you.