- Home /
Animation rotations are not rotating in the right direction.
Hi Everyone, I'm fairly new to animations in Unity, but I'm very confused here. I downloaded an asset from the asset store and am creating a new animation in unity. I basically am clicking the record button in the Animation window, and them manually rotating the parts on the gameobject (in the editor). This works, but when I play the animation, it's rotating the object in the wrong direction. Even when the rotation is the same between frames for x and y, but not z, it still changes the value of x and y between frames. Obviously, I'm doing something wrong here, but I really don't know what that is. Can someone help me out here?
Thanks!
So, I have partially solved my problem. In the animation window, if you select the individual key, you can then set properties of that key. I selected all keys and changed the properties to "Broken" and set both tangents to "Linear".
This is not perfect, but it's much much better. The animations are not flying all over the place.
Answer by ryanmillerca · Nov 16, 2017 at 12:57 AM
This is an unfortunate shortcoming of Unity's animation tools. Because you're keying rotations via the transform parameters, you're keying them as Vector3 (x,y,z). Compared to Quaternions, these are poorly suited to rotation tweening because of an issue called 'gimbal lock' (explained here). I suggest using a 3d package like Blender or Maya for your animation if you have a lot of complex rotation keyframing. Otherwise, you could look at simplifying your animation to only animate 1 axis at a time.
Your answer
Follow this Question
Related Questions
Only animate rotation not position 1 Answer
Run smooth continuous rotation animation of spinner using animator 1 Answer
I need animate arms with script when I rotate my character like in Escape of Tarkov 0 Answers
Mirrored animation doesnt rotate correctly 0 Answers
Armature stuck on a single side after an animation 0 Answers