When recording keyframes, rotations are causing me some issues. The short of it is that it seems that Slate tries to normalize euler angles to be between -360 and +360. If a rotation exceeds that amount, it gets normalized to be 0, and restarts from there. This causes issues when continuing to rotate an object.
As an example, I’m rotating a hand bone here. You can see the curves for this are fine right now:
But if I rotate it just a little more, one of the rotation axes wraps around:
This results in the hand animation through that entire change, which looks ridiculous.
Is there something I can do to prevent this behavior, and get a better result from rotating bones? It seems all I can do right now is manually edit the keys after recording them, and either add or subtract 360 from the recorded amount. That’s painful, and the rotation doesn’t end up looking very good on playback.
I’ve spent a bit of time looking into this, and unfortunately the images didn’t submit properly in my initial post. Just to make it clear what I’m talking about, here are the curves generated by rotating an object on its local y-axis a little bit more each frame using the rotation handle for this action clip. You can see the attached image. The basic idea is, as soon as one of the euler components exceeds 360, or is below 0, the keyframe tool is instead storing an equivalent euler rotation. But that’s really bad in terms of actually recording rotation keyframes.
You can compare this to what Unity’s animation recording does in the other image I’ve attached. In Unity’s animation window, continued local rotation of a bone preserves the full euler angle.
Looking at the Slate code, I see that the rotation handle is actually just getting a quaternion value, which it converts into a vector3. It won’t preserve any non-normalized-/over-rotation.
So is there a way around this? Another option for storing rotation values without normalizing them like this?
I can confirm that this is an issue right now which I do need to solve. Just to clarify, does this happen for you both in editor and play mode, or only in play mode? Can you please confirm this information?
It’s both in Editor and in Play Mode. However, to be more specific, I only record keyframes while in Editor. But since it records the “truncated” Vector3 values, it plays them back in the undesirable way both when previewing the cutscene and when actually playing the cutscene in Play mode.
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.