Reply To: Animating local transform?

Forums 💬 Slate Sequencer ⚙️ Support Animating local transform? Reply To: Animating local transform?

#20434
dgoyette
Participant

    I was initially using Slate.ActionClips.RotateTo in a Transform track, but found it was setting ‘eulerAngles’. So I made a copy of this, named it LocalRotateTo, and started setting localEulerAngles. So that addresses my initial concern that I wanted to be able to set local rotation instead of world rotation.

    As for the second issue, here’s a simple test case: Put an object in a room, and set its “X” rotation to 10. (So, it’s looking down a little.) Using a RotateTo clip to rotate to (0,0,0), and you’ll see that the x rotation goes from 10 to 0 as expected. Now, change the object’s initial rotation to -10 instead, and run the animation again. This time, the RotateTo considers the rotation to be -350 (if you look at what gets sent into Vector3.LerpUnclamped). The RotateTo clip then lerps from 350 to 0, causing the object to do a backflip to get back to 0. I’m not sure there’s much to be done about that, though, aside from making Quaternion versions of the Rotate scripts (which I’m thinking of doing myself.)