Fix proxy pivot derivation to use global rest (local rest was misplacing the Quaternius joints)
Full build / Import + headless tests (push) Successful in 55s
Full build / Full desktop build + optional release (push) Skipped

This commit is contained in:
zwitschi committed 2026-11-06 08:35:14 +01:00
1 parent 271f10ac4d
commit 0cd12af994
1 file changed
+3 -3
+3 -3
View File
@@ -495,14 +495,14 @@ func _bind_bones() -> void:
for index in _skeleton.get_bone_count(): for index in _skeleton.get_bone_count():
_bone_indices[_skeleton.get_bone_name(index)] = index _bone_indices[_skeleton.get_bone_name(index)] = index
## First-found rest origin for a list of candidate bone names. Lets the proxy ## First-found rest origin for a list of candidate bone names, in the skeleton's
## pivots track the actual skeleton (old 13-core or Quaternius 62-joint). ## space (global rest), so proxy pivots sit on the actual joints.
func _rest_origin(names: Array) -> Vector3: func _rest_origin(names: Array) -> Vector3:
if _skeleton == null: if _skeleton == null:
return Vector3.ZERO return Vector3.ZERO
for bone_name in names: for bone_name in names:
if _bone_indices.has(bone_name): 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 return Vector3.ZERO
## Copy the proxy pivot rotations onto armature bones. Limb bones point down, so ## Copy the proxy pivot rotations onto armature bones. Limb bones point down, so