I’m trying to set up some cutscenes using the Animation Editor, and I’m running into a really annoying bug. In the shot, I have a camera looking in a direction for several seconds, then it rotates a few degrees over about half a second. The problem I’m having is that for the 8 or so frames before the keyframe beginning the rotation, the object animates.
I’ve tried a variety of things to fix it, and nothing works. I’ve tried flat, linear, and constant tangents, and I’ve tried setting keyframes for every frame where the counter-animation happens. Nothing fixes it.
If anyone wants to try to duplicate it, here’s what I’ve got:
Create a camera. Put an object in front of it for visual reference. Add a new animation clip to the camera using these keyframe values (all tangents are linear)
Frame 0 - rot.x = -2.068636
Frame 1 - rot.x = -2.068636
Frame 617 rot.x = -2.068636
Frame 632 rot.x = -5.439356
You should get counter-animation starting around frame 595-617.
(Frames 0 and 1 are the same key because I’ve gotten into the habit of double-keying the first two frames since Unity doesn’t seem to accept key-framed values unless there are at least two keys on the curve. ie. You can’t create a curve with a single key at the beginning of an animation and expect Unity to respect that curve.)