Player controller leaving model behind

Fedora Dev 4 months ago in Game Creator updated by Marti (Lead Developer) 3 months ago 7 1 duplicate

For some reason, when the player moves straight in one of the cardinal directions, the character controller leaves the model behind. When the player looks away from the cardinal direction, the model snaps back to the controller. Any way to fix this?

Replicating is fairly easy.

1. Install GC and Cinemachine.

2. Create a new player. Apply the FPS Model and set the movement style to face camera direction.

3. Add empty object under the armature's head bone.

4. Create a virtual cam. Have it hard locked to the empty object's transform.

5. Use the POV aim component.

6. Walk around. Notice while facing close to cardinal directions, the movement appears to get smooth and slows down. When you look away from the cardinal direction, you will snap forward.

I also noticed that this only works when the pitch of the camera was facing close to the horizon. Looking too high or too low doesn't cause the issue.

For whatever reason, this doesn't happen if both the scene view and game view are showing. If you pause during this weirdness and check the scene view, you can clearly see the controller moving ahead of the player's model.

Unity version:
Game Creator version:
Satisfaction mark by Fedora Dev 4 months ago

Duplicates 1

Not a bug

Looks like you have activated root motion. To disable it, expand the Player/Character object in the Hierarchy Panel and, in the first child, if you select it you'll see the Animator component in the Inspector. You should be able to untick the "Root Motion" option.

Marti, I checked root motion and it looks like it is not active.

Under review

Taking a closer look, you're using Cinemachine. Is there any reason why you're using that, instead of Game Creator's FPS camera motor? That should work flawlessly.

Mixing other assets is perfectly fine, but modifying the model structure can yield to side effects like this one.

I had switched to using GC's camera system, however the camera motors are not as flexible as Cinemachine's virtual cameras, The main issue being that the position is purely based on copying the player's position and adding an offset to it. If I show the model while using it, the head's height does not stay consistent with the model unless I use stiff spine animation, which prevents good POV animations. With Cinemachine, it all works more out of the box, with many more options as well. If possible, I would like to continue using Cinemachine. If you have at least a clue on where the issue might be in GC, I'd love to look at it on my end to see if I can get something working. At the moment, I haven't any clue where to look.

This could be related to the animation culling (there is another thread with a similar problem). Could you try selecting the Player's first child, and in the Animator component, where it says "Culling Mode" choose the option to "Always Animate"?

That appears to have 100% fixed the issue! Odd that it only happens when walking in a cardinal direction, though. Must be some weird rotation-linked rounding error. I'll familiarize myself with the culling mode to try to better understand what was going on. Thanks!


Happy to hear it :-) Cheers!