Godot Version
4.2.1
Question
Before I made and imported my own character model mesh and rig, I had a placeholder character scene:
Both characterbody scripts are the same, but I’ve updated it to try and fit the newer scene.
I need the script to be attached to a CharacterBody3D to access some of the inherited functions and fields. This worked perfectly in the placeholder scene where I am able to make the root node a CharacterBody3D. However, in the imported mesh character, I have the whole rig as a reference/inheritance to the import scene. This is so that I can easily change and reimport the rig if need be. The problem then is this: I can’t change the root node of the scene with the rig or else the inheritance breaks, and I can’t move the rig under the CharacterBody node because Godot won’t let me. So, when I transform the characterbody in script, the rig does not move along with it.
I’ve tried re-parenting the rig to the characterbody at runtime, but it seems like Godot prevents the parent change. Setting the rig’s transform to the characterbody’s transform works until I need to have the characterbody inherit another node’s transform, at which point the rig no longer moves with the characterbody.
Am I missing a solution to this? I’m a bit new to Godot so apologies if I’ve missed something obvious.