improvements to ai but still needs a lot of work

This commit is contained in:
derek
2025-04-28 16:32:34 -05:00
parent f0ec7bc953
commit 80cf7ec2c5
8 changed files with 83 additions and 34 deletions

View File

@@ -218,6 +218,7 @@ transform = Transform3D(1, 0, 0, 0, 0.992332, 0.123601, 0, -0.123601, 0.992332,
[node name="BulletRay" type="RayCast3D" parent="Head/Recoil/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.487738)
visible = false
target_position = Vector3(0, 0, -200)
collision_mask = 105
collide_with_areas = true
@@ -227,6 +228,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -4.482)
[node name="InteractRay" type="RayCast3D" parent="Head/Recoil/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00322104, -0.0232438)
visible = false
target_position = Vector3(0, 0, -2.5)
collision_mask = 162
hit_back_faces = false

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=91 format=4 uid="uid://djr7vnr1hcx82"]
[gd_scene load_steps=94 format=4 uid="uid://djr7vnr1hcx82"]
[ext_resource type="Script" uid="uid://cdofgtwevbray" path="res://scripts/spider.gd" id="1_7e7fe"]
[ext_resource type="PackedScene" uid="uid://h5ojldugfyyu" path="res://assets/bullet_enemy.tscn" id="2_aew5r"]
@@ -832,11 +832,26 @@ stream_0/stream = ExtResource("29_nhal8")
stream_1/stream = ExtResource("29_nhal8")
stream_2/stream = ExtResource("29_nhal8")
[sub_resource type="SphereMesh" id="SphereMesh_aasxo"]
radius = 0.1
height = 0.2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1b3cb"]
transparency = 1
blend_mode = 1
shading_mode = 0
albedo_color = Color(0, 1, 0, 0.498039)
[sub_resource type="CylinderMesh" id="CylinderMesh_ycipa"]
top_radius = 0.1
bottom_radius = 0.01
[node name="spider" type="CharacterBody3D" node_paths=PackedStringArray("nav_agent", "hit_targets", "visibility_areas", "line_of_sight_ray") groups=["enemy", "persist"]]
collision_layer = 8
collision_mask = 521
up_direction = Vector3(0.0449994, 0.998987, 0)
script = ExtResource("1_7e7fe")
debug_tools = true
nav_agent = NodePath("NavigationAgent3D")
hit_targets = [NodePath("body/backTarget")]
visibility_areas = [NodePath("VisibilityArea")]
@@ -964,6 +979,7 @@ collision_mask = 5
[node name="LineOfSight" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00161432, 1.62046, 0.00134204)
top_level = true
target_position = Vector3(0, 0, -50)
collision_mask = 5
@@ -1128,6 +1144,21 @@ unit_size = 5.0
[node name="Alarm" type="AudioStreamPlayer3D" parent="AUIDO"]
stream = SubResource("AudioStreamRandomizer_aasxo")
[node name="DebugTracker" type="Node3D" parent="."]
top_level = true
visible = false
[node name="Sphere" type="MeshInstance3D" parent="DebugTracker"]
mesh = SubResource("SphereMesh_aasxo")
skeleton = NodePath("../MeshHandle")
surface_material_override/0 = SubResource("StandardMaterial3D_1b3cb")
[node name="Mesh" type="MeshInstance3D" parent="DebugTracker"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
mesh = SubResource("CylinderMesh_ycipa")
skeleton = NodePath("../..")
surface_material_override/0 = SubResource("StandardMaterial3D_1b3cb")
[connection signal="body_entered" from="body/backTarget" to="body/backTarget" method="_on_body_entered"]
[connection signal="body_part_hit" from="body/backTarget" to="." method="_on_area_3d_body_part_hit"]
[connection signal="timeout" from="Timers/prefire_timer" to="." method="_on_prefire_timer_timeout"]

View File

@@ -194,5 +194,5 @@ surface_material_override/0 = SubResource("StandardMaterial3D_fmyhe")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_776o6")
&"": SubResource("AnimationLibrary_776o6")
}