fix: use force_update_all_bone_transforms() instead of undeclared constant

NOTIFICATION_UPDATE_SKELETON is not accessible in GDScript scope.
Use Skeleton3D.force_update_all_bone_transforms() which recomputes the
full bone hierarchy and emits bone_pose_changed signals.

Co-Authored-By: Hermes Agent <[email protected]>
This commit is contained in:
2026-06-25 01:00:34 -04:00
parent 43b870465b
commit df4c70017c
+4 -4
View File
@@ -312,12 +312,12 @@ func _add_animation_to_player(ap: AnimationPlayer, anim_name: String, anim: Anim
print("SkinnedPlayerModel: added '%s' (%d tracks)" % [anim_name, anim.get_track_count()])
func _update_skin() -> void:
## Force skeleton skin update by notifying Skeleton3D that poses changed.
## Force skeleton skin update by recomputing all bone transforms.
## GLTF runtime loaded models need this because AnimationPlayer's internal
## bone pose updates don't always trigger the visual pipeline's dirty flags.
## NOTIFICATION_UPDATE_SKELETON causes the Skeleton3D to recompute its
## bone transforms and notify attached MeshInstances to update vertex buffers.
skeleton.notification(NOTIFICATION_UPDATE_SKELETON)
## force_update_all_bone_transforms() recomputes the full bone hierarchy
## and emits bone_pose_changed, which causes MeshInstance to update vertex buffers.
skeleton.force_update_all_bone_transforms()
func _setup_first_person() -> void:
# In first person, hide the head and upper body so only arms/hands/legs show