I’m trying to implement humans with both sexes in my game. They will have the same animations, but the models will be different. I’m not sure how to go about re-using the AnimationTree, because each model has its own AnimationPlayer. This means that if I want to change the AnimationTree, I would need to add one of the models to the base scene, do my changes, then remove it every time.
This seems cumbersome and I’m wondering if there is an established way to go about sharing an AnimationTree.
Here is the scene hierarchy I currently have set up. The man and woman models are added directly to the scene from their .glb format.
You can keep the animation tree root node resource and only change the “Anim Player” for your inerhited scenes. As long as the animation names are the same the tree can work with different Anim Player nodes/libraries
you need to create the scene and there has to be no inheritance from the file other than humanoid skeleton, which you set up before creating the scene, in import.
HumanMale and HumanFemale should not be there.
woman and man should be the root of the scene. change node type to character body or whatever you use.
animationTree and animationPlayer should be siblings.
2 - here’s a tutorial on how to import a character into godot:
3 -
with all of the above, you follow the first steps in creating a new character scene from file, then take the animationtree from the old scene and copy-paste into the new scene.
the animation names should be the same or it will throw errors. you can fix these errors by changing what doesn’t match in case you have different animations, just change the animation.
the tree structure should be the same and the skeletons have the same name.
both must be humanoid (have a humanoid bone profile).
I do this all the time, I start with a bot character for prototyping and then create a new one from the new models and copy-paste ALL the nodes, attachments, colliders, etc too. I just change the root to CharacterBody3D and add the script.