3D model with animation not grounded when animating

Godot Version

4.2.1

Question

I am working with Kenney’s 3D models and I can import them correctly to Godot, but when it comes to animations, I have an issue : in fact, I use some basic FBX animations for walking, running, etc… and when I put them together, a weird thing happens : my character is not grounded anymore :

More information about import :

  1. During import, I created a SkeletonProfileHumanoid to retarget the model
  2. Reduced Root Scale to 0.5 (because the model was to big for my game)
  3. When importing the animation, also created a SkeletonProfileHumanoid to retarget the animation.

Here my animation player settings:

Any ideas why my character is not grounded ?

Thanks

One possibility is that the model’s transforms for the mesh or skeleton (or both) have an offset. You can load the model into blender and see if the location is non-zero.

1 Like

Thanks for th reply, I opened the model in blender and tried to find if they have any issue with the location as you suggested, and it seems not:

Both the model and armature are located à (0,0,0).
Can the LeftFootCtrl and RightFootCtrl can cause some trouble with the animation? :thinking:

Control bones can definitely cause problems if they’re contributing to the exported animation, but are they actually showing up as tracks with keyframes in Godot? If the animation was baked with deformation bones only at export, it’s less likely to be a problem (though I have run into some rare animation baking bugs with IK in Blender, so it’s not impossible.)

I think it’s more likely your scale. Do you get the same artifact without scaling? Have you tried applying the scale in Blender instead of in Godot and re-exporting?

1 Like

I just re-exported my fbx to glb using blender and reduced the scale of the model (applied a 0.5 scaling on the Root object on blender and then applied the scale transformation using Ctrl+A) and I still have the same issue.

One thing I don’t understand is that when you use a BoneMap (Humanoid Skeleton), the model’s armature shouldn’t be able to work with any animation that is also mapped with a Humanoid Skeleton?

I tried to remove the LeftFootCtrl and RightFootCtrl but blender doesn’t let me do that. I got to search a little more to remove these.

EDIT :
While searching in Godot, I found that the engine creates a “Root” bone and when I select it, I see there is an offset :


When setting the Y coordinate to 0, the model goes down and touches the “ground”. Is there a way to customize this during export or maybe create a “custom skeleton” and map all my character models with it?