Wrong character placement: Transform Offsets get ignored if there's a call to OnAnimatorMove()

** Sorry, I made the mistake of posting this in the Cinemachine forum, it should be in the Timeline forum **
Hi, I noticed there’s a very annoying bug when you try to animate a character with cinemachine and you use Transform Offsets.

The syntoms: You might noticed that everything looks great when you preview the scene in editor mode, but the position of the character is not kept in playmode (with the animation starting from wherever the character is at the time instead of the position that you set in the timeline).

What’s happening: If you experience this behavior and can’t figure out why it’s happening, check if the animator that you’re trying to control with the timeline has the ApplyRootMotion tick box removed and instead shows a sign saying “Handled by script”. If this is the case, then the issue is that cinemachine can’t force the use of root motion because something is overwriting it.

Solution: So, in playmode you should disable all components till one removes the sign. That component is the cullprit, and if you look inside, you’ll probably see a OnAnimatorMove() call. Even if this callback is empty, it will ruin the Transform Offsets of cinemachine.

Why is this a bug: Any component that has a OnAnimatorMove() callback, even if empty, will make cinemachine act wrongly and have the animation screwed. Imagine just adding a script to your Character’s prefab and finding that all of the sudden all of the animation in your game are broken.


How to reproduce: Create a scene and a timeline, animate a character in a given position using TransformOffsets. Put a script to the same object holding the animator with an OnAnimatorMove callback. Move the original position of the character, start the scene, and run the timeline. The bug will make the character start from a different position than that that the timeline set.