Added world collision

This commit is contained in:
2025-10-21 16:20:28 +03:00
parent 19be23c539
commit 2d58e385fd
6 changed files with 59 additions and 18 deletions
+27 -2
View File
@@ -1,6 +1,31 @@
[gd_scene load_steps=2 format=3 uid="uid://dgc0087kvarx6"]
[gd_scene load_steps=3 format=3 uid="uid://dgc0087kvarx6"]
[ext_resource type="Script" uid="uid://c6gpm3edyr4nu" path="res://game/passage.gd" id="1_ltkyg"]
[node name="Passage" type="Node"]
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ltkyg"]
[node name="Passage" type="StaticBody2D"]
script = ExtResource("1_ltkyg")
[node name="CollisionTop" type="CollisionShape2D" parent="."]
position = Vector2(320, 0)
rotation = 3.1415927
shape = SubResource("WorldBoundaryShape2D_ltkyg")
one_way_collision = true
[node name="CollisionBottom" type="CollisionShape2D" parent="."]
position = Vector2(320, 360)
shape = SubResource("WorldBoundaryShape2D_ltkyg")
one_way_collision = true
[node name="CollisionLeft" type="CollisionShape2D" parent="."]
position = Vector2(0, 180)
rotation = 1.5707964
shape = SubResource("WorldBoundaryShape2D_ltkyg")
one_way_collision = true
[node name="CollisionRight" type="CollisionShape2D" parent="."]
position = Vector2(640, 180)
rotation = -1.5707964
shape = SubResource("WorldBoundaryShape2D_ltkyg")
one_way_collision = true