I have a 3D scene where my character needs to navigate a treacherous floor. I have custom "obstacle-crossing" animations, but for them to work, I need to move him away from his origin. At the end of the animation, I use a Teleport command to match him back to his destination, but there's almost always a brief frame where I can see the end of his last animation flicker across the screen (caused by the single cycle offset between the teleport and animation actions).
Is there way to sync the animation and teleport together? Or at least cut down the frame rate when it happens? I've gotten around it in some parts by doing a camera change, but that wouldn't look good for this scene.
Comments
Behaviour like this seems to be more noticeable with Unity 5.2 onwards. I don't know if they just upped performance, but I've noticed this a couple of times in my own project.
I'd need to see a video demonstrating this more clearly for a more complete answer, but you could try swapping the Teleport Action with the one that re-sets the animation (assuming they're placed one after the other already).
However, if you're using Unity's root motion features, it may be possible to set the animation up such that it's already in the correct position afterwards - no need for an additional teleport. My own game actually has a root motion-enabled variant of the player that I can swap in when needed.