Animation bug, the player moves up when attacking or dodging

Hey, looks like I’m almost done, this is an awesome course.

One thing is that from the beginning I have this weird animation issues, when the Player is idle and Running, his feet are slightly below the ground:


(although when running its not noticeable.

When I click attack or Dodge is when it looks funky, the animation pushes above ground:


And then he goes back to Idle, back slightly under.

Same with dodge

And by the way, I tried putting the character higher on start, but it has effect, the character falls down to the same place, a bit under the terrain.

First and foremost, there will never be a perfect placement with the feet without a 3rd party foot ik solution. This is a common problem in Unity, and for the most part, we have to “live with it”.

Part of the problem is that we’re placing the character itself on the ground using the capsule collider (the CharacterController, in this case), but we’re viewing the character with the model itself. Unfortunately, we’re never guaranteed that the animations will be “perfect”…

What you can do is adjust the CharacterController’s center and height so that it better aligns with the character, but with the animations in question, if you fix the feet sinking in the ground, you’ll be left with the dodge and attack animations feet even HIGHER off of the ground.

Yeah, that makes sense. Is there any way to adjust the animation to slightly move it down? Also could it be the fact that I am using a different character? Because in the course I don’t notice such a jump in animation.

In the case of how we’re using Generic animations here, it’s a matter of physically editing the Animation in the Animation tab.
When using Humanoid animations, there is an option in the import dialogue to offset the Y axis. Unfortunately, Mixamo animations tend to look even wonkier when converted to Humanoid, so that’s an option for when using humanoid models/animations from the Asset Store.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms