New navigation

This commit is contained in:
Marco 2025-04-09 11:43:44 +02:00
commit 86f7459837
8 changed files with 119 additions and 56 deletions

View file

@ -16,7 +16,7 @@ region = Rect2(0, 0, 16, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ss2y0"]
size = Vector2(11, 14)
[node name="Barrel" type="Area2D" groups=["Destroyable"]]
[node name="Barrel" type="Area2D" groups=["Destroyable", "navigation_polygon_source_geometry_group"]]
collision_layer = 64
collision_mask = 138
script = ExtResource("1_avwdx")
@ -37,10 +37,9 @@ shape = SubResource("RectangleShape2D_2ewfl")
position = Vector2(0, -2)
texture = SubResource("AtlasTexture_v7gy8")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
[node name="RigidBody2D" type="StaticBody2D" parent="." groups=["navigation_polygon_source_geometry_group"]]
collision_layer = 64
collision_mask = 10
gravity_scale = 0.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
visible = false

View file

@ -45,11 +45,10 @@ shape = SubResource("RectangleShape2D_2ewfl")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_mupuc")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
[node name="RigidBody2D" type="StaticBody2D" parent="."]
visible = false
collision_layer = 64
collision_mask = 10
gravity_scale = 0.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
position = Vector2(0, -3)