feat: implemented enemy wretched patrol and chase states

This commit is contained in:
Sara 2025-07-21 15:05:02 +02:00
parent 1b0e4384b9
commit 9517588415
12 changed files with 224 additions and 17 deletions

View file

@ -29,6 +29,8 @@ navigation_mesh = SubResource("NavigationMesh_7ng1a")
[node name="CSGCombiner3D" type="CSGCombiner3D" parent="NavigationRegion3D"]
use_collision = true
collision_layer = 3
collision_mask = 0
[node name="CSGBox3D2" type="CSGBox3D" parent="NavigationRegion3D/CSGCombiner3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.424776, 3.1962457, -1.9109192)
@ -399,7 +401,16 @@ slide_on_ceiling = false
patrol_path = NodePath("../PatrolPath")
[node name="EnemyWretched" parent="NpcUnit" instance=ExtResource("3_7ng1a")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.017590523, 0.023196908, 3.073964)
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0.017590523, 0.023196908, 3.073964)
[node name="EnemyWretched2" parent="NpcUnit" instance=ExtResource("3_7ng1a")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, -1.0904664, 0.023196908, 1.6584808)
[node name="EnemyWretched3" parent="NpcUnit" instance=ExtResource("3_7ng1a")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 1.1613213, 0.023196908, 1.513694)
[node name="EnemyWretched4" parent="NpcUnit" instance=ExtResource("3_7ng1a")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, -0.977286, 0.023196908, 4.202239)
[node name="PatrolPath" type="PatrolPath" parent="."]

View file

@ -19,3 +19,7 @@ unique_name_in_owner = true
unique_name_in_owner = true
path_desired_distance = 0.25
debug_enabled = true
[node name="PlayerDetector" type="PlayerDetector" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 1.4599279, 0)

View file

@ -72,3 +72,5 @@ switch_weapon={
3d_render/layer_1="Default"
3d_render/layer_2="FirstPerson"
3d_physics/layer_1="Movement"
3d_physics/layer_2="Hit"