fix: clear global pose overrides when switching to procedural anim
This commit is contained in:
@@ -515,7 +515,9 @@ func _process(delta: float) -> void:
|
||||
animation_player.active = false
|
||||
# Reset all bones to rest pose before applying procedural animation
|
||||
if skeleton:
|
||||
# Clear any previous global pose overrides
|
||||
for i in range(skeleton.get_bone_count()):
|
||||
skeleton.set_bone_global_pose_override(i, Transform3D(), 0.0, true)
|
||||
skeleton.set_bone_pose_rotation(i, _bone_rest_local_rot.get(i, Quaternion.IDENTITY))
|
||||
skeleton.set_bone_pose_position(i, _bone_rest_local_pos.get(i, Vector3.ZERO))
|
||||
elif animation_player and animation_player.has_animation(target_anim):
|
||||
|
||||
Reference in New Issue
Block a user