1
\$\begingroup\$

So, I have a rigged character and created a simple walk animation in blender and export it as gltf 2.0 to godot. And in godot I also via code rotate a bone of that rigged model. The bone rotates correctly when there is no walk animation active/playing.

But the moment I walk the bone which I rotate via code doesn't rotate. And I think it's cuz the Animation overrides the bone rotations ? I tried deleting the keyframe for that particular bone in both godot and blender but that didn't work. Anyone know how I can make both my code rotation of the bone and the animation work simultaneously ? If there is a better way or I am doing wrong please let me know.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

Answering from the top of my head: You need to change which pose you use.

You don't want to set the same that the animation sets because it overwrites it. Instead use a different pose. They compose into the final position. See How to get global world coordinates of bone in Godot GDscript and .translated function not working in Godot / best way to change position of bone.

If I recall correctly you need to use custom pose (set_bone_custom_pose), because the animation sets the pose (set_bone_pose).

\$\endgroup\$
1
  • \$\begingroup\$ Thx get_bone_custom_pose and set_bone_custom_pose helped ! \$\endgroup\$
    – JeffX12
    Commented Sep 20, 2021 at 4:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .