Files
godot-demo-projects/2d/physics_tests/tests/functional/test_one_way_collision.tscn
Hugo Locurcio b4eff8de9d Update all demos for Godot 4.6, fix Global Illumination demo
- Rebake lightmaps in Global Illumination demo with supersampling
  to improve quality.
- Increase SDFGI quality in the Global Illumination demo
  (slightly more demanding, but better matches the quality standards
  of 2026).

All demos had Project > Tools > Upgrade Project Files ran on them
with 4.6.stable (4.6.stable.mono for demos in the `mono/` folder).
2026-02-10 23:56:35 +01:00

199 lines
6.3 KiB
Plaintext

[gd_scene format=3 uid="uid://dsql8ihjjomwc"]
[ext_resource type="Script" uid="uid://chf520lkt2et" path="res://tests/functional/test_one_way_collision.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://dce6bomnuj24c" path="res://icon.webp" id="2"]
[ext_resource type="PackedScene" uid="uid://cwjfkltvisc0n" path="res://tests/test_options.tscn" id="3"]
[ext_resource type="Script" uid="uid://dyjwu6gqen7tq" path="res://utils/label_slider_value.gd" id="4"]
[ext_resource type="Script" uid="uid://05j0xhs6ygly" path="res://utils/slider.gd" id="5"]
[sub_resource type="CircleShape2D" id="CircleShape2D_e5nt1"]
radius = 16.0
[sub_resource type="RectangleShape2D" id="2"]
size = Vector2(128, 64)
[sub_resource type="RectangleShape2D" id="3"]
size = Vector2(64, 64)
[node name="Test" type="Node2D" unique_id=1907505970]
script = ExtResource("1")
[node name="LabelTestType" type="Label" parent="." unique_id=1061420347]
offset_left = 14.0
offset_top = 79.0
offset_right = 145.0
offset_bottom = 93.0
text = "Testing: "
[node name="Options" parent="." unique_id=1692809787 instance=ExtResource("3")]
[node name="Controls" type="VBoxContainer" parent="." unique_id=1527188243]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 25.0
offset_top = 402.0
offset_right = 425.0
offset_bottom = 500.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 10
[node name="PlatformSize" type="HBoxContainer" parent="Controls" unique_id=1520140173]
layout_mode = 2
theme_override_constants/separation = 20
alignment = 2
[node name="Label" type="Label" parent="Controls/PlatformSize" unique_id=1397346691]
custom_minimum_size = Vector2(120, 2.08165e-12)
layout_mode = 2
size_flags_horizontal = 0
text = "Platform size"
[node name="HSlider" type="HSlider" parent="Controls/PlatformSize" unique_id=2127572956]
custom_minimum_size = Vector2(200, 2.08165e-12)
layout_mode = 2
min_value = 64.0
max_value = 256.0
value = 64.0
script = ExtResource("5")
[node name="LabelValue" type="Label" parent="Controls/PlatformSize" unique_id=1669245169]
custom_minimum_size = Vector2(60, 2.08165e-12)
layout_mode = 2
text = "64.0"
script = ExtResource("4")
[node name="PlatformAngle" type="HBoxContainer" parent="Controls" unique_id=2047908002]
layout_mode = 2
theme_override_constants/separation = 20
alignment = 2
[node name="Label" type="Label" parent="Controls/PlatformAngle" unique_id=1347694656]
custom_minimum_size = Vector2(120, 2.08165e-12)
layout_mode = 2
text = "Platform angle"
[node name="HSlider" type="HSlider" parent="Controls/PlatformAngle" unique_id=657872341]
custom_minimum_size = Vector2(200, 2.08165e-12)
layout_mode = 2
max_value = 360.0
script = ExtResource("5")
snap_step = 5.0
[node name="LabelValue" type="Label" parent="Controls/PlatformAngle" unique_id=541909043]
custom_minimum_size = Vector2(60, 2.08165e-12)
layout_mode = 2
text = "0.0"
script = ExtResource("4")
[node name="BodyAngle" type="HBoxContainer" parent="Controls" unique_id=905556826]
layout_mode = 2
theme_override_constants/separation = 20
alignment = 2
[node name="Label" type="Label" parent="Controls/BodyAngle" unique_id=1365776267]
custom_minimum_size = Vector2(120, 2.08165e-12)
layout_mode = 2
text = "Body angle"
[node name="HSlider" type="HSlider" parent="Controls/BodyAngle" unique_id=1999919062]
custom_minimum_size = Vector2(200, 2.08165e-12)
layout_mode = 2
max_value = 360.0
script = ExtResource("5")
snap_step = 5.0
[node name="LabelValue" type="Label" parent="Controls/BodyAngle" unique_id=1987445644]
custom_minimum_size = Vector2(60, 2.08165e-12)
layout_mode = 2
text = "0.0"
script = ExtResource("4")
[node name="LabelResultTitle" type="Label" parent="." unique_id=1234187329]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 34.1273
offset_top = 251.131
offset_right = 88.1273
offset_bottom = 265.131
text = "RESULT: "
[node name="LabelResult" type="Label" parent="." unique_id=209392518]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 34.1273
offset_top = 266.131
offset_right = 88.1273
offset_bottom = 280.131
text = "..."
[node name="LabelRestart" type="Label" parent="." unique_id=289828093]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 34.1273
offset_top = 304.841
offset_right = 139.127
offset_bottom = 318.841
text = "SPACE - RESTART"
[node name="Timer" type="Timer" parent="." unique_id=247261981]
wait_time = 5.0
one_shot = true
[node name="TargetArea2D" type="Area2D" parent="." unique_id=921452050]
position = Vector2(512, 300)
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetArea2D" unique_id=2129384612]
shape = SubResource("CircleShape2D_e5nt1")
debug_color = Color(1, 0, 1, 0.0980392)
[node name="OneWayStaticBody2D" type="StaticBody2D" parent="." unique_id=966759254]
position = Vector2(512, 300)
[node name="CollisionShape2D" type="CollisionShape2D" parent="OneWayStaticBody2D" unique_id=513423926]
shape = SubResource("2")
one_way_collision = true
debug_color = Color(0, 0.533333, 1, 0.0980392)
[node name="RigidBody2D" type="RigidBody2D" parent="." unique_id=1310305007]
position = Vector2(300, 300)
collision_mask = 2147483649
gravity_scale = 0.0
contact_monitor = true
[node name="Sprite" type="Sprite2D" parent="RigidBody2D" unique_id=1194019764]
self_modulate = Color(1, 1, 1, 0.501961)
scale = Vector2(0.5, 0.5)
texture = ExtResource("2")
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D" unique_id=1461267028]
shape = SubResource("3")
debug_color = Color(1, 1, 0, 0.0980392)
[node name="CharacterBody2D" type="CharacterBody2D" parent="." unique_id=1647646622]
position = Vector2(300, 300)
collision_mask = 2147483649
[node name="Sprite" type="Sprite2D" parent="CharacterBody2D" unique_id=75704299]
self_modulate = Color(1, 1, 1, 0.501961)
scale = Vector2(0.5, 0.5)
texture = ExtResource("2")
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D" unique_id=1641387924]
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"]
[connection signal="value_changed" from="Controls/BodyAngle/HSlider" to="." method="_update_rigidbody_angle"]