Hey everyone,
Im running once again into a problem with rotating objects through code. Here is my case:
I have a script that helps me make GFXs. Often times, I have an object, like a “disc”, that I want to spin around itself. I know the starting euler angles (from inspector), I know the final euler angles (from inspector as well), and I know how long the interpolation should be. However, as you might guess, interpolating euler angles to rotate doesnt work as planned and the object will make strange angles along the way.
Problem is, the same happens using an Animation Clip. And if I use quaternions, it does work without strange angles, but not as expected, because the Quaternion.Lerp will use the SHORTER way to rotate towards the target rotation… which is a big problem, for example, when making a “slash” that rotates 200 degrees, slashing in the front of the character, the object rotates 160 through the back…
So… what is the best way to rotate something, either through code or Unity’s animation system, in a way that I can rotate it as much as I want, in whatever angles I want, and making it possible to make it rotate 360 degrees, or who knows, even more?
Thanks!