diff --git a/src/game/npc_avatar.gd b/src/game/npc_avatar.gd index 1d2ed18..41d8752 100644 --- a/src/game/npc_avatar.gd +++ b/src/game/npc_avatar.gd @@ -495,14 +495,14 @@ func _bind_bones() -> void: for index in _skeleton.get_bone_count(): _bone_indices[_skeleton.get_bone_name(index)] = index -## First-found rest origin for a list of candidate bone names. Lets the proxy -## pivots track the actual skeleton (old 13-core or Quaternius 62-joint). +## First-found rest origin for a list of candidate bone names, in the skeleton's +## space (global rest), so proxy pivots sit on the actual joints. func _rest_origin(names: Array) -> Vector3: if _skeleton == null: return Vector3.ZERO for bone_name in names: if _bone_indices.has(bone_name): - return _skeleton.get_bone_rest(_bone_indices[bone_name]).origin + return _skeleton.get_bone_global_rest(_bone_indices[bone_name]).origin return Vector3.ZERO ## Copy the proxy pivot rotations onto armature bones. Limb bones point down, so