mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
Change physics joint tests to freeze bodies as kinematic in the Physics tests demos (#1177)
This commit is contained in:
committed by
GitHub
parent
7befd7c718
commit
9db52662cb
@@ -113,6 +113,7 @@ func _create_joint() -> void:
|
|||||||
parent_body.gravity_scale = 0.0
|
parent_body.gravity_scale = 0.0
|
||||||
child_body.gravity_scale = 0.0
|
child_body.gravity_scale = 0.0
|
||||||
else:
|
else:
|
||||||
|
parent_body.freeze_mode = RigidBody2D.FREEZE_MODE_KINEMATIC
|
||||||
parent_body.freeze = true
|
parent_body.freeze = true
|
||||||
if _change_positions:
|
if _change_positions:
|
||||||
root.add_child(parent_body)
|
root.add_child(parent_body)
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ func _create_joint() -> void:
|
|||||||
parent_body.gravity_scale = 0.0
|
parent_body.gravity_scale = 0.0
|
||||||
child_body.gravity_scale = 0.0
|
child_body.gravity_scale = 0.0
|
||||||
else:
|
else:
|
||||||
|
parent_body.freeze_mode = RigidBody3D.FREEZE_MODE_KINEMATIC
|
||||||
parent_body.freeze = true
|
parent_body.freeze = true
|
||||||
if _change_positions:
|
if _change_positions:
|
||||||
root.add_child(parent_body)
|
root.add_child(parent_body)
|
||||||
|
|||||||
Reference in New Issue
Block a user