Feat/14 movement overhaul #20
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user