@panicq said:
EDIT: it looks like SetBoneGlobalPoseOverride is breaking the parent/child relationship between the bones oO ??
Yeah, unfortunately if you use SetBoneGlobalPoseOverride
with a weight of 1, the bone will no longer receive transform changes from the parent bone(s). In Godot 3.1, setting the bone rotation/position of a node would update the positions and rotations of child bones, however this was changed in Godot 3.2. Unfortunately, it means this functionality needs to be implemented by the programmer.
The code I used in the IK demo for handling the positioning of child nodes is below:
bone_trans.origin = last_bone.origin - last_bone.basis.z.normalized() * bones_in_chain_lengths[i-1]
Where last_bone
is the parent bone to the bone being currently processed, and bones_in_chain_lengths
holds all of the lengths of each bone. It is not ideal, but it works.