Feat/14 movement overhaul #20
@@ -515,7 +515,9 @@ func _process(delta: float) -> void:
|
|||||||
animation_player.active = false
|
animation_player.active = false
|
||||||
# Reset all bones to rest pose before applying procedural animation
|
# Reset all bones to rest pose before applying procedural animation
|
||||||
if skeleton:
|
if skeleton:
|
||||||
|
# Clear any previous global pose overrides
|
||||||
for i in range(skeleton.get_bone_count()):
|
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_rotation(i, _bone_rest_local_rot.get(i, Quaternion.IDENTITY))
|
||||||
skeleton.set_bone_pose_position(i, _bone_rest_local_pos.get(i, Vector3.ZERO))
|
skeleton.set_bone_pose_position(i, _bone_rest_local_pos.get(i, Vector3.ZERO))
|
||||||
elif animation_player and animation_player.has_animation(target_anim):
|
elif animation_player and animation_player.has_animation(target_anim):
|
||||||
|
|||||||
Reference in New Issue
Block a user