mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 14:10:55 +03:00
Use Jolt Physics in all 3D demos that use physics, improve physics tests demos (#1195)
- Add options for physics ticks per second, time scale, max physics steps per frame
and physics interpolation to the 2D and 3D physics tests demos.
- Physics ticks per second are always multiplied by time scale so that
time scale does not affect the physics simulation quality.
- Enable 4× MSAA for better debug shape display. Remove meshes/lights as
the debug collision fill make these unnecessary.
- Switch to the Mobile rendering method in the 2D physics tests demo
to allow for 2D MSAA, as it's not implemented in Compatibility yet.
- Improve collision shapes color in the 2D and 3D physics tests demos
for better visibility. Each PhysicsBody type now has its own collision
shape color.
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
[sub_resource type="RectangleShape2D" id="1"]
|
||||
size = Vector2(40, 40)
|
||||
|
||||
[node name="StackBox" type="RigidDynamicBody2D"]
|
||||
[node name="StackBox" type="RigidBody2D"]
|
||||
position = Vector2(-180, -20)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("1")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
@@ -32,6 +32,7 @@ _jump_force = 50.0
|
||||
_snap_distance = 1.0
|
||||
|
||||
[node name="ViewportContainer" type="SubViewportContainer" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_right = 1024.0
|
||||
@@ -39,9 +40,6 @@ offset_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
stretch = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Viewport" type="SubViewport" parent="ViewportContainer"]
|
||||
handle_input_locally = false
|
||||
@@ -60,6 +58,7 @@ script = ExtResource("7")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/CharacterBody2D"]
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CharacterBodyRay2D" type="CharacterBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(30, 40)
|
||||
@@ -69,66 +68,63 @@ script = ExtResource("7")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/CharacterBodyRay2D"]
|
||||
position = Vector2(0, -2.5)
|
||||
shape = SubResource("RectangleShape2D_scs3g")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/CharacterBodyRay2D"]
|
||||
position = Vector2(0, -2)
|
||||
shape = SubResource("SeparationRayShape2D_vby12")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidDynamicBody2D" type="RigidDynamicBody2D" parent="ViewportContainer/Viewport"]
|
||||
[node name="RigidDynamicBody2D" type="RigidBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(30, 40)
|
||||
collision_mask = 2147483649
|
||||
physics_material_override = SubResource("1")
|
||||
contacts_reported = 4
|
||||
contact_monitor = true
|
||||
lock_rotation = true
|
||||
contact_monitor = true
|
||||
script = ExtResource("2")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/RigidDynamicBody2D"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyRay2D" type="RigidDynamicBody2D" parent="ViewportContainer/Viewport"]
|
||||
[node name="RigidBodyRay2D" type="RigidBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(30, 40)
|
||||
collision_mask = 2147483649
|
||||
physics_material_override = SubResource("1")
|
||||
contacts_reported = 4
|
||||
contact_monitor = true
|
||||
lock_rotation = true
|
||||
contact_monitor = true
|
||||
script = ExtResource("2")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/RigidBodyRay2D"]
|
||||
position = Vector2(0, -2.5)
|
||||
shape = SubResource("RectangleShape2D_scs3g")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/RigidBodyRay2D"]
|
||||
position = Vector2(0, -2)
|
||||
shape = SubResource("SeparationRayShape2D_vby12")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="Wall1" type="StaticBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(20, 40)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="SubViewportContainer/SubViewport/Wall1"]
|
||||
rotation = 1.5708
|
||||
shape = SubResource("6")
|
||||
|
||||
[node name="Wall2" type="StaticBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(122, 40)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="SubViewportContainer/SubViewport/Wall2"]
|
||||
rotation = 1.5708
|
||||
shape = SubResource("6")
|
||||
|
||||
[node name="Platform1" type="StaticBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(50, 44)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/Platform1"]
|
||||
shape = SubResource("6")
|
||||
one_way_collision = true
|
||||
debug_color = Color(0, 0.533333, 1, 0.0980392)
|
||||
|
||||
[node name="Platform2" type="StaticBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(80, 38)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ViewportContainer/Viewport/Platform2"]
|
||||
shape = SubResource("6")
|
||||
debug_color = Color(0, 0.533333, 1, 0.0980392)
|
||||
|
||||
[node name="Slope" type="StaticBody2D" parent="ViewportContainer/Viewport"]
|
||||
position = Vector2(85, 36)
|
||||
@@ -136,15 +132,22 @@ position = Vector2(85, 36)
|
||||
[node name="CollisionShape2D" type="CollisionPolygon2D" parent="ViewportContainer/Viewport/Slope"]
|
||||
polygon = PackedVector2Array(0, 0, 6, 0, 22, 16, 16, 16)
|
||||
|
||||
[node name="SubViewportContainer_SubViewport_Wall1#CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource("6")
|
||||
debug_color = Color(0, 0.6, 0.7, 0.42)
|
||||
|
||||
[node name="SubViewportContainer_SubViewport_Wall2#CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = 1.5708
|
||||
shape = SubResource("6")
|
||||
debug_color = Color(0, 0.6, 0.7, 0.42)
|
||||
|
||||
[node name="LabelTestType" type="Label" parent="."]
|
||||
offset_left = 14.0
|
||||
offset_top = 79.0
|
||||
offset_right = 145.0
|
||||
offset_bottom = 93.0
|
||||
text = "Testing: "
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Options" parent="." instance=ExtResource("3")]
|
||||
|
||||
@@ -154,9 +157,6 @@ offset_top = 237.929
|
||||
offset_right = 145.0
|
||||
offset_bottom = 251.929
|
||||
text = "ON FLOOR"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LabelControls" type="Label" parent="."]
|
||||
offset_left = 14.0
|
||||
@@ -165,6 +165,3 @@ offset_right = 145.0
|
||||
offset_bottom = 294.291
|
||||
text = "LEFT/RIGHT - MOVE
|
||||
UP - JUMP"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
@@ -70,15 +70,10 @@ alignment = 2
|
||||
|
||||
[node name="Label" type="Label" parent="FloorMaxAngle"]
|
||||
layout_mode = 2
|
||||
offset_right = 123.0
|
||||
offset_bottom = 26.0
|
||||
text = "Floor Max angle"
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="FloorMaxAngle"]
|
||||
layout_mode = 2
|
||||
offset_left = 143.0
|
||||
offset_right = 419.0
|
||||
offset_bottom = 16.0
|
||||
size_flags_horizontal = 3
|
||||
max_value = 180.0
|
||||
script = ExtResource("3_cd5g0")
|
||||
@@ -86,9 +81,6 @@ snap_step = 5.0
|
||||
|
||||
[node name="LabelValue" type="Label" parent="FloorMaxAngle"]
|
||||
layout_mode = 2
|
||||
offset_left = 439.0
|
||||
offset_right = 462.0
|
||||
offset_bottom = 26.0
|
||||
text = "0.0"
|
||||
script = ExtResource("4_eoplu")
|
||||
|
||||
@@ -99,6 +91,7 @@ script = ExtResource("7")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CharacterBodyRay2D" type="CharacterBody2D" parent="."]
|
||||
position = Vector2(100, 450)
|
||||
@@ -108,37 +101,42 @@ script = ExtResource("7")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
||||
position = Vector2(0, -16)
|
||||
shape = SubResource("CircleShape2D_llvur")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
||||
position = Vector2(0, -16)
|
||||
shape = SubResource("RayShape2D_3lv1w")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidDynamicBody2D" type="RigidBody2D" parent="."]
|
||||
position = Vector2(100, 450)
|
||||
collision_mask = 2147483649
|
||||
physics_material_override = SubResource("1")
|
||||
contact_monitor = true
|
||||
lock_rotation = true
|
||||
contact_monitor = true
|
||||
script = ExtResource("6")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidDynamicBody2D"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyRay2D" type="RigidBody2D" parent="."]
|
||||
position = Vector2(100, 450)
|
||||
collision_mask = 2147483649
|
||||
physics_material_override = SubResource("1")
|
||||
contact_monitor = true
|
||||
lock_rotation = true
|
||||
contact_monitor = true
|
||||
script = ExtResource("6")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
||||
position = Vector2(-7.62939e-06, -16)
|
||||
shape = SubResource("CircleShape2D_dr08f")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
||||
position = Vector2(-7.62939e-06, -16)
|
||||
shape = SubResource("RayShape2D_w83f0")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="StaticSceneFlat" parent="." instance=ExtResource("4")]
|
||||
position = Vector2(0, 12)
|
||||
|
||||
@@ -56,6 +56,7 @@ script = ExtResource("7")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CharacterBodyRay2D" type="CharacterBody2D" parent="."]
|
||||
position = Vector2(250, 460)
|
||||
@@ -65,18 +66,22 @@ script = ExtResource("7")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
||||
position = Vector2(0, -8)
|
||||
shape = SubResource("RectangleShape2D_jx2e1")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
||||
position = Vector2(0, 8)
|
||||
shape = SubResource("RayShape2D_206f5")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2DLeft" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
||||
position = Vector2(-12, 8)
|
||||
shape = SubResource("RayShape2D_206f5")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2DRight" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
||||
position = Vector2(12, 8)
|
||||
shape = SubResource("RayShape2D_206f5")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidDynamicBody2D" type="RigidBody2D" parent="."]
|
||||
position = Vector2(250, 460)
|
||||
@@ -88,6 +93,7 @@ script = ExtResource("6")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidDynamicBody2D"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyRay2D" type="RigidBody2D" parent="."]
|
||||
position = Vector2(250, 460)
|
||||
@@ -100,18 +106,22 @@ script = ExtResource("6")
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
||||
position = Vector2(0, -8)
|
||||
shape = SubResource("RectangleShape2D_jx2e1")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
||||
position = Vector2(0, 8)
|
||||
shape = SubResource("RayShape2D_206f5")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2DLeft" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
||||
position = Vector2(-12, 8)
|
||||
shape = SubResource("RayShape2D_206f5")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CollisionShapeRay2DRight" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
||||
position = Vector2(12, 8)
|
||||
shape = SubResource("RayShape2D_206f5")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="JumpTargetArea2D" type="Area2D" parent="."]
|
||||
visible = false
|
||||
@@ -120,6 +130,7 @@ position = Vector2(810, 390)
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="JumpTargetArea2D"]
|
||||
shape = SubResource("5")
|
||||
disabled = true
|
||||
debug_color = Color(1, 0, 1, 0.0980392)
|
||||
|
||||
[node name="FallTargetArea2D" type="Area2D" parent="."]
|
||||
visible = false
|
||||
@@ -128,6 +139,7 @@ position = Vector2(250, 480)
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="FallTargetArea2D"]
|
||||
shape = SubResource("5")
|
||||
disabled = true
|
||||
debug_color = Color(1, 0, 1, 0.0980392)
|
||||
|
||||
[node name="StaticSceneFlat" parent="." instance=ExtResource("4")]
|
||||
position = Vector2(0, 12)
|
||||
|
||||
@@ -133,7 +133,7 @@ func _add_collision(space_state: PhysicsDirectSpaceState2D, pos: Vector2, shape:
|
||||
|
||||
var color := Color.GREEN
|
||||
if results.is_empty():
|
||||
color = Color.WHITE.darkened(0.5)
|
||||
color = Color.BLACK
|
||||
|
||||
# Draw collision query shape.
|
||||
add_shape(shape, shape_query.transform, color)
|
||||
|
||||
@@ -26,7 +26,7 @@ script = ExtResource("1")
|
||||
z_index = -1
|
||||
z_as_relative = false
|
||||
|
||||
[node name="RigidBodyRectangle" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyRectangle" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(114.877, 248.76)
|
||||
freeze = true
|
||||
|
||||
@@ -34,15 +34,17 @@ freeze = true
|
||||
rotation = -1.19206
|
||||
scale = Vector2(1.2, 1.2)
|
||||
shape = SubResource("1")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodySphere" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodySphere" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(314.894, 257.658)
|
||||
freeze = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodySphere"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyCapsule" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyCapsule" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(465.629, 261.204)
|
||||
freeze = true
|
||||
|
||||
@@ -50,8 +52,9 @@ freeze = true
|
||||
rotation = -0.202458
|
||||
scale = Vector2(1.2, 1.2)
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyConvexPolygon" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyConvexPolygon" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(613.385, 252.771)
|
||||
freeze = true
|
||||
|
||||
@@ -62,7 +65,7 @@ polygon = PackedVector2Array(10.7, -54.5, 28.3596, -49.4067, 47.6282, -34.3806,
|
||||
modulate = Color(1, 1, 1, 0.392157)
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="RigidBodyConcavePolygon" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyConcavePolygon" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(771.159, 252.771)
|
||||
freeze = true
|
||||
|
||||
@@ -73,18 +76,20 @@ polygon = PackedVector2Array(-5.93512, -43.2195, 6.44476, -42.9695, 11.127, -54.
|
||||
modulate = Color(1, 1, 1, 0.392157)
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="RigidBodyConcaveSegments" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyConcaveSegments" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(930.097, 252.771)
|
||||
freeze = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodyConcaveSegments"]
|
||||
shape = SubResource("4")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="GodotIcon" type="Sprite2D" parent="Shapes/RigidBodyConcaveSegments"]
|
||||
modulate = Color(1, 1, 1, 0.392157)
|
||||
texture = ExtResource("2")
|
||||
|
||||
[node name="Controls" type="VBoxContainer" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 25.3619
|
||||
@@ -92,54 +97,35 @@ offset_top = 416.765
|
||||
offset_right = 218.362
|
||||
offset_bottom = 458.765
|
||||
theme_override_constants/separation = 10
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="OffsetH" type="HBoxContainer" parent="Controls"]
|
||||
offset_right = 204.0
|
||||
offset_bottom = 26.0
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
alignment = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="Controls/OffsetH"]
|
||||
offset_right = 64.0
|
||||
offset_bottom = 26.0
|
||||
layout_mode = 2
|
||||
text = "Offset H"
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="Controls/OffsetH"]
|
||||
offset_left = 84.0
|
||||
offset_right = 204.0
|
||||
offset_bottom = 16.0
|
||||
rect_min_size = Vector2(120, 0)
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
min_value = -1.0
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
|
||||
[node name="OffsetV" type="HBoxContainer" parent="Controls"]
|
||||
offset_top = 36.0
|
||||
offset_right = 204.0
|
||||
offset_bottom = 62.0
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 20
|
||||
alignment = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="Controls/OffsetV"]
|
||||
offset_left = 2.0
|
||||
offset_right = 64.0
|
||||
offset_bottom = 26.0
|
||||
layout_mode = 2
|
||||
text = "Offset V"
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="Controls/OffsetV"]
|
||||
offset_left = 84.0
|
||||
offset_right = 204.0
|
||||
offset_bottom = 16.0
|
||||
rect_min_size = Vector2(120, 0)
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
min_value = -1.0
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
|
||||
@@ -155,6 +155,7 @@ position = Vector2(512, 300)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetArea2D"]
|
||||
shape = SubResource("CircleShape2D_e5nt1")
|
||||
debug_color = Color(1, 0, 1, 0.0980392)
|
||||
|
||||
[node name="OneWayStaticBody2D" type="StaticBody2D" parent="."]
|
||||
position = Vector2(512, 300)
|
||||
@@ -162,6 +163,7 @@ position = Vector2(512, 300)
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="OneWayStaticBody2D"]
|
||||
shape = SubResource("2")
|
||||
one_way_collision = true
|
||||
debug_color = Color(0, 0.533333, 1, 0.0980392)
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
position = Vector2(300, 300)
|
||||
@@ -176,6 +178,7 @@ texture = ExtResource("2")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
|
||||
position = Vector2(300, 300)
|
||||
@@ -188,6 +191,7 @@ texture = ExtResource("2")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(0, 1, 0, 0.0980392)
|
||||
|
||||
[connection signal="value_changed" from="Controls/PlatformSize/HSlider" to="." method="_update_platform_size"]
|
||||
[connection signal="value_changed" from="Controls/PlatformAngle/HSlider" to="." method="_update_platform_angle"]
|
||||
|
||||
@@ -26,7 +26,7 @@ theme_override_font_sizes/font_size = 16
|
||||
z_index = -1
|
||||
z_as_relative = false
|
||||
|
||||
[node name="RigidBodyRectangle" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyRectangle" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(114.877, 248.76)
|
||||
freeze = true
|
||||
|
||||
@@ -34,15 +34,17 @@ freeze = true
|
||||
rotation = -1.19206
|
||||
scale = Vector2(1.2, 1.2)
|
||||
shape = SubResource("1")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodySphere" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodySphere" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(314.894, 257.658)
|
||||
freeze = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Shapes/RigidBodySphere"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyCapsule" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyCapsule" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(465.629, 261.204)
|
||||
freeze = true
|
||||
|
||||
@@ -50,8 +52,9 @@ freeze = true
|
||||
rotation = -0.202458
|
||||
scale = Vector2(1.2, 1.2)
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyConvexPolygon" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyConvexPolygon" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(613.385, 252.771)
|
||||
freeze = true
|
||||
|
||||
@@ -62,7 +65,7 @@ polygon = PackedVector2Array(10.7, -54.5, 28.3596, -49.4067, 47.6282, -34.3806,
|
||||
modulate = Color(1, 1, 1, 0.392157)
|
||||
texture = ExtResource("1")
|
||||
|
||||
[node name="RigidBodyConcavePolygon" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyConcavePolygon" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(771.159, 252.771)
|
||||
freeze = true
|
||||
|
||||
@@ -73,7 +76,7 @@ polygon = PackedVector2Array(-5.93512, -43.2195, 6.44476, -42.9695, 11.127, -54.
|
||||
modulate = Color(1, 1, 1, 0.392157)
|
||||
texture = ExtResource("1")
|
||||
|
||||
[node name="RigidBodyConcaveSegments" type="RigidDynamicBody2D" parent="Shapes"]
|
||||
[node name="RigidBodyConcaveSegments" type="RigidBody2D" parent="Shapes"]
|
||||
position = Vector2(930.097, 252.771)
|
||||
freeze = true
|
||||
|
||||
|
||||
@@ -20,23 +20,25 @@ script = ExtResource("2")
|
||||
|
||||
[node name="DynamicShapes" type="Node2D" parent="."]
|
||||
|
||||
[node name="RigidBodyRectangle" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyRectangle" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(96, 127)
|
||||
script = ExtResource("3")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyRectangle"]
|
||||
rotation = 0.675442
|
||||
shape = SubResource("1")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyCapsule" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyCapsule" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(270.165, 139.444)
|
||||
script = ExtResource("3")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyCapsule"]
|
||||
rotation = -0.202458
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyConcavePolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyConcavePolygon" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(683.614, 132.749)
|
||||
script = ExtResource("3")
|
||||
|
||||
@@ -49,7 +51,7 @@ self_modulate = Color(1, 1, 1, 0.392157)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("1")
|
||||
|
||||
[node name="RigidBodyConvexPolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyConvexPolygon" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(473.536, 134.336)
|
||||
script = ExtResource("3")
|
||||
|
||||
@@ -62,11 +64,12 @@ self_modulate = Color(1, 1, 1, 0.392157)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("1")
|
||||
|
||||
[node name="RigidBodySphere" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodySphere" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(919.968, 115.129)
|
||||
script = ExtResource("3")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodySphere"]
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="StaticScene" parent="." instance=ExtResource("6")]
|
||||
|
||||
@@ -17,10 +17,10 @@ height = 17.0
|
||||
|
||||
[node name="Test" type="Node2D"]
|
||||
script = ExtResource("2")
|
||||
_enable_debug_collision = false
|
||||
spawns = [NodePath("SpawnTarget1"), NodePath("SpawnTarget2"), NodePath("SpawnTarget3"), NodePath("SpawnTarget4"), NodePath("SpawnTarget5"), NodePath("SpawnTarget6"), NodePath("SpawnTarget7"), NodePath("SpawnTarget8"), NodePath("SpawnTarget9")]
|
||||
spawns = Array[NodePath]([NodePath("SpawnTarget1"), NodePath("SpawnTarget2"), NodePath("SpawnTarget3"), NodePath("SpawnTarget4"), NodePath("SpawnTarget5"), NodePath("SpawnTarget6"), NodePath("SpawnTarget7"), NodePath("SpawnTarget8"), NodePath("SpawnTarget9")])
|
||||
spawn_count = 300
|
||||
spawn_randomize = Vector2(10, 10)
|
||||
_enable_debug_collision = false
|
||||
|
||||
[node name="Options" parent="." instance=ExtResource("4")]
|
||||
|
||||
@@ -57,28 +57,31 @@ position = Vector2(0, 125.017)
|
||||
|
||||
[node name="DynamicShapes" type="Node2D" parent="."]
|
||||
|
||||
[node name="RigidBodyRectangle" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyRectangle" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(0, 1024)
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyRectangle"]
|
||||
shape = SubResource("1")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodySphere" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodySphere" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(100, 1024)
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodySphere"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyCapsule" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyCapsule" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(200, 1024)
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyCapsule"]
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyConvexPolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyConvexPolygon" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(300, 1024)
|
||||
gravity_scale = 0.0
|
||||
|
||||
@@ -91,7 +94,7 @@ self_modulate = Color(1, 1, 1, 0.392157)
|
||||
scale = Vector2(0.1, 0.1)
|
||||
texture = ExtResource("3")
|
||||
|
||||
[node name="RigidBodyConcavePolygon" type="RigidDynamicBody2D" parent="DynamicShapes"]
|
||||
[node name="RigidBodyConcavePolygon" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(400, 1024)
|
||||
gravity_scale = 0.0
|
||||
|
||||
|
||||
@@ -36,18 +36,21 @@ position = Vector2(0, 1024)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyRectangle"]
|
||||
shape = SubResource("1")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodySphere" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(100, 1024)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodySphere"]
|
||||
shape = SubResource("2")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyCapsule" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(200, 1024)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="DynamicShapes/RigidBodyCapsule"]
|
||||
shape = SubResource("3")
|
||||
debug_color = Color(1, 1, 0, 0.0980392)
|
||||
|
||||
[node name="RigidBodyConvexPolygon" type="RigidBody2D" parent="DynamicShapes"]
|
||||
position = Vector2(300, 1024)
|
||||
|
||||
@@ -10,3 +10,4 @@ position = Vector2(512, 550)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBodyPolygon"]
|
||||
shape = SubResource("1")
|
||||
debug_color = Color(0, 0.533333, 1, 0.0980392)
|
||||
|
||||
@@ -7,7 +7,7 @@ offset_left = 10.0
|
||||
offset_top = 106.719
|
||||
offset_right = 125.0
|
||||
offset_bottom = 126.719
|
||||
text = "TEST OPTIONS"
|
||||
text = "Test Options"
|
||||
flat = false
|
||||
align = 0
|
||||
script = ExtResource("1")
|
||||
|
||||
Reference in New Issue
Block a user