Change physics joint tests to freeze bodies as kinematic in the Physics tests demos (#1177)

This commit is contained in:
Mikael Hermansson
2025-04-14 18:58:55 +02:00
committed by GitHub
parent 7befd7c718
commit 9db52662cb
2 changed files with 2 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ func _create_joint() -> void:
parent_body.gravity_scale = 0.0
child_body.gravity_scale = 0.0
else:
parent_body.freeze_mode = RigidBody2D.FREEZE_MODE_KINEMATIC
parent_body.freeze = true
if _change_positions:
root.add_child(parent_body)

View File

@@ -113,6 +113,7 @@ func _create_joint() -> void:
parent_body.gravity_scale = 0.0
child_body.gravity_scale = 0.0
else:
parent_body.freeze_mode = RigidBody3D.FREEZE_MODE_KINEMATIC
parent_body.freeze = true
if _change_positions:
root.add_child(parent_body)