turret tweaks

This commit is contained in:
derek
2024-07-18 13:45:37 -05:00
parent 330e4a599d
commit 5f67dbe6ba
11 changed files with 95 additions and 36 deletions

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=11 format=3 uid="uid://h5ojldugfyyu"]
[gd_scene load_steps=12 format=3 uid="uid://h5ojldugfyyu"]
[ext_resource type="Script" path="res://scripts/bullet_enemy.gd" id="1_so2e8"]
[ext_resource type="PackedScene" uid="uid://crvohhc6kgshn" path="res://assets/bullet_hole.tscn" id="2_8iodt"]
[ext_resource type="Texture2D" uid="uid://dqytegxsmb5kg" path="res://assets/Models/bullet.transparency.png" id="2_gihte"]
[ext_resource type="AudioStream" uid="uid://dqj4cx05f25jj" path="res://assets/Audio/punch-body-hard-SBA-300156881.wav" id="3_1ujcu"]
@@ -74,6 +75,7 @@ emission_energy_multiplier = 8.0
[node name="BulletEnemy" type="Node3D"]
script = ExtResource("1_so2e8")
bullethole = ExtResource("2_8iodt")
[node name="gunbullet1" type="Node3D" parent="."]
transform = Transform3D(-2, 0, -3.01992e-07, 0, 2, 0, 3.01992e-07, 0, -2, 0, 0, -0.765756)

22
assets/dead_player.tscn Normal file
View File

@@ -0,0 +1,22 @@
[gd_scene load_steps=2 format=3 uid="uid://dcmno6wafk5hg"]
[sub_resource type="SphereShape3D" id="SphereShape3D_tufx2"]
radius = 1.26422
[node name="DeadPlayer" type="Node3D"]
[node name="CameraDrop" type="RigidBody3D" parent="."]
[node name="Camera3D" type="Camera3D" parent="CameraDrop"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0341401, 0.111267)
current = true
[node name="GunRay" type="RayCast3D" parent="CameraDrop/Camera3D" groups=["gun_ray"]]
transform = Transform3D(0.977933, 0, -0.208919, 0, 1, 7.45058e-09, 0.208919, 0, 0.977933, 0, -0.197421, -0.129669)
target_position = Vector3(0, 0, -1.2)
[node name="AudioListener3D" type="AudioListener3D" parent="CameraDrop/Camera3D"]
transform = Transform3D(1, 0, 0, 0, 0.992332, 0.123601, 0, -0.123601, 0.992332, 0, -0.921646, -0.000722691)
[node name="CollisionShape3D" type="CollisionShape3D" parent="CameraDrop"]
shape = SubResource("SphereShape3D_tufx2")

View File

@@ -434,7 +434,7 @@ mesh = SubResource("ArrayMesh_exipw")
skeleton = NodePath("")
[node name="leg1" type="MeshInstance3D" parent="body"]
transform = Transform3D(0.699737, 0.712058, 0.0578054, -0.71325, 0.700909, 0, -0.0405164, -0.0412298, 0.998326, -0.305074, -0.206463, 0.323723)
transform = Transform3D(0.545256, 0.554857, 0.628353, -0.71325, 0.700909, 0, -0.440419, -0.448174, 0.777926, -0.305074, -0.206463, 0.323723)
mesh = SubResource("ArrayMesh_cwwo8")
skeleton = NodePath("")
@@ -444,7 +444,7 @@ mesh = SubResource("ArrayMesh_epfun")
skeleton = NodePath("")
[node name="leg2" type="MeshInstance3D" parent="body"]
transform = Transform3D(-0.560365, -0.56996, 0.600945, -0.713082, 0.70108, 1.11034e-08, -0.42131, -0.428524, -0.79929, 0.318604, -0.206463, 0.321527)
transform = Transform3D(-0.700522, -0.712808, 0.0342363, -0.713225, 0.700934, 1.61711e-09, -0.0239974, -0.0244182, -0.999414, 0.318604, -0.206463, 0.321527)
mesh = SubResource("ArrayMesh_j8pcb")
skeleton = NodePath("")
@@ -454,7 +454,7 @@ mesh = SubResource("ArrayMesh_vgp1v")
skeleton = NodePath("")
[node name="leg3" type="MeshInstance3D" parent="body"]
transform = Transform3D(0.699737, 0.712058, -0.0578054, -0.71325, 0.700909, 0, 0.0405164, 0.0412298, 0.998326, -0.327034, -0.206463, -0.315327)
transform = Transform3D(0.545256, 0.554857, -0.628353, -0.71325, 0.700909, 0, 0.440419, 0.448174, 0.777926, -0.327034, -0.206463, -0.315327)
mesh = SubResource("ArrayMesh_wv2l2")
skeleton = NodePath("")
@@ -464,7 +464,7 @@ mesh = SubResource("ArrayMesh_375ql")
skeleton = NodePath("")
[node name="leg4" type="MeshInstance3D" parent="body"]
transform = Transform3D(-0.531641, -0.540743, -0.651885, -0.713083, 0.701079, -1.62945e-07, 0.457024, 0.464848, -0.758317, 0.351545, -0.206463, -0.339484)
transform = Transform3D(-0.698191, -0.710435, -0.0883846, -0.713227, 0.700934, -2.37315e-08, 0.0619519, 0.0630383, -0.996086, 0.351545, -0.206463, -0.339484)
mesh = SubResource("ArrayMesh_v81tc")
skeleton = NodePath("")

View File

@@ -1,9 +1,10 @@
[gd_scene load_steps=40 format=3 uid="uid://djr7vnr1hcx82"]
[gd_scene load_steps=41 format=3 uid="uid://djr7vnr1hcx82"]
[ext_resource type="Script" path="res://scripts/spider.gd" id="1_7e7fe"]
[ext_resource type="Texture2D" uid="uid://dmyn4eq2r12ue" path="res://assets/Models/spider1.albedoRAW.png" id="1_di6b8"]
[ext_resource type="PackedScene" uid="uid://h5ojldugfyyu" path="res://assets/bullet_enemy.tscn" id="2_aew5r"]
[ext_resource type="Texture2D" uid="uid://dqhke14ulten2" path="res://assets/Models/spider1.roughnessRAW.png" id="2_pntfg"]
[ext_resource type="PackedScene" uid="uid://c1gdehrsytlkk" path="res://assets/casing_2.tscn" id="3_6esjv"]
[ext_resource type="Texture2D" uid="uid://c54kwbix1mo58" path="res://assets/Models/spider1.turret.png" id="3_npupg"]
[ext_resource type="Texture2D" uid="uid://cvi0upsh0e1mu" path="res://assets/Models/spider1.turret.roughness1.png" id="4_hb265"]
[ext_resource type="Texture2D" uid="uid://r7awur11yerj" path="res://assets/Models/spider1.gunbarrel.albedo.png" id="5_dtcjr"]
@@ -28,7 +29,7 @@ metallic = 1.0
roughness = 0.194864
texture_filter = 2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8q21q"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3sct2"]
resource_name = "WarningLight"
cull_mode = 2
albedo_color = Color(1, 0.486272, 0.152941, 1)
@@ -108,7 +109,7 @@ _surfaces = [{
"index_count": 240,
"index_data": PackedByteArray(0, 0, 60, 0, 66, 0, 7, 0, 79, 0, 71, 0, 3, 0, 90, 0, 63, 0, 4, 0, 105, 0, 91, 0, 1, 0, 84, 0, 102, 0, 9, 0, 123, 0, 81, 0, 10, 0, 132, 0, 72, 0, 17, 0, 146, 0, 101, 0, 24, 0, 159, 0, 110, 0, 26, 0, 170, 0, 118, 0, 8, 0, 143, 0, 121, 0, 12, 0, 151, 0, 137, 0, 19, 0, 167, 0, 149, 0, 22, 0, 179, 0, 157, 0, 28, 0, 127, 0, 173, 0, 32, 0, 212, 0, 180, 0, 35, 0, 225, 0, 190, 0, 42, 0, 233, 0, 194, 0, 45, 0, 234, 0, 198, 0, 51, 0, 221, 0, 207, 0, 217, 0, 56, 0, 235, 0, 219, 0, 237, 0, 205, 0, 204, 0, 236, 0, 47, 0, 238, 0, 58, 0, 228, 0, 239, 0, 229, 0, 200, 0, 202, 0, 231, 0, 40, 0, 230, 0, 59, 0, 224, 0, 232, 0, 226, 0, 192, 0, 193, 0, 227, 0, 37, 0, 222, 0, 57, 0, 214, 0, 223, 0, 215, 0, 188, 0, 186, 0, 210, 0, 30, 0, 211, 0, 55, 0, 216, 0, 213, 0, 218, 0, 181, 0, 183, 0, 220, 0, 50, 0, 128, 0, 53, 0, 209, 0, 126, 0, 208, 0, 172, 0, 171, 0, 206, 0, 48, 0, 177, 0, 49, 0, 199, 0, 178, 0, 201, 0, 156, 0, 158, 0, 203, 0, 41, 0, 165, 0, 44, 0, 196, 0, 166, 0, 197, 0, 148, 0, 147, 0, 195, 0, 39, 0, 152, 0, 36, 0, 191, 0, 150, 0, 189, 0, 136, 0, 135, 0, 187, 0, 34, 0, 141, 0, 33, 0, 182, 0, 142, 0, 184, 0, 120, 0, 122, 0, 185, 0, 52, 0, 169, 0, 46, 0, 176, 0, 168, 0, 175, 0, 116, 0, 114, 0, 174, 0, 20, 0, 161, 0, 43, 0, 163, 0, 160, 0, 162, 0, 112, 0, 113, 0, 164, 0, 18, 0, 145, 0, 38, 0, 155, 0, 144, 0, 154, 0, 100, 0, 98, 0, 153, 0, 14, 0, 134, 0, 31, 0, 139, 0, 133, 0, 138, 0, 74, 0, 76, 0, 140, 0, 6, 0, 125, 0, 54, 0, 131, 0, 124, 0, 130, 0, 83, 0, 82, 0, 129, 0, 29, 0, 87, 0, 25, 0, 117, 0, 85, 0, 115, 0, 103, 0, 104, 0, 119, 0, 21, 0, 106, 0, 23, 0, 108, 0, 107, 0, 109, 0, 93, 0, 95, 0, 111, 0, 16, 0, 94, 0, 15, 0, 99, 0, 92, 0, 97, 0, 65, 0, 64, 0, 96, 0, 13, 0, 80, 0, 27, 0, 89, 0, 78, 0, 88, 0, 70, 0, 68, 0, 86, 0, 2, 0, 62, 0, 11, 0, 77, 0, 61, 0, 73, 0, 67, 0, 69, 0, 75, 0, 5, 0),
"lods": [0.0794293, PackedByteArray(0, 0, 241, 0, 66, 0, 66, 0, 241, 0, 240, 0, 240, 0, 241, 0, 251, 0, 240, 0, 251, 0, 1, 1, 1, 1, 250, 0, 240, 0, 240, 0, 250, 0, 86, 0, 240, 0, 86, 0, 68, 0, 68, 0, 86, 0, 2, 0, 242, 0, 4, 1, 251, 0, 242, 0, 2, 1, 4, 1, 3, 0, 90, 0, 13, 0, 244, 0, 13, 0, 90, 0, 244, 0, 253, 0, 243, 0, 253, 0, 6, 1, 243, 0, 6, 1, 3, 1, 243, 0, 105, 0, 244, 0, 91, 0, 4, 0, 105, 0, 91, 0, 105, 0, 247, 0, 245, 0, 247, 0, 254, 0, 245, 0, 247, 0, 45, 0, 254, 0, 45, 0, 228, 0, 254, 0, 234, 0, 228, 0, 45, 0, 234, 0, 58, 0, 228, 0, 5, 1, 235, 0, 45, 0, 5, 1, 56, 0, 235, 0, 246, 0, 5, 1, 255, 0, 249, 0, 5, 1, 246, 0, 249, 0, 0, 1, 5, 1, 252, 0, 216, 0, 0, 1, 211, 0, 216, 0, 252, 0, 211, 0, 55, 0, 216, 0, 1, 0, 84, 0, 102, 0, 84, 0, 25, 0, 102, 0, 102, 0, 25, 0, 248, 0)],
"material": SubResource("StandardMaterial3D_8q21q"),
"material": SubResource("StandardMaterial3D_3sct2"),
"name": "WarningLight",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
@@ -575,7 +576,9 @@ radius = 0.25
[node name="spider" type="CharacterBody3D"]
script = ExtResource("1_7e7fe")
SPEED = 0.0
bullet = ExtResource("2_aew5r")
casing = ExtResource("3_6esjv")
bullet_speed = 100
[node name="TurretLook" type="RayCast3D" parent="."]
@@ -595,6 +598,10 @@ target_position = Vector3(0, 0, -1)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.099713, -0.000110626, -0.580876)
target_position = Vector3(0, 0, -1)
[node name="CasingEjector" type="RayCast3D" parent="TurretLook/Turret"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.213031, -0.000886798, 0.0469466)
target_position = Vector3(1, 0, 0)
[node name="TurretLookNext" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00161432, 1.62046, 0.00134204)
target_position = Vector3(0, 0, -50)
@@ -679,16 +686,13 @@ avoidance_enabled = true
[node name="Timers" type="Node" parent="."]
[node name="prefire_timer" type="Timer" parent="Timers"]
wait_time = 0.2
wait_time = 0.3
[node name="postfire_timer" type="Timer" parent="Timers"]
wait_time = 2.0
one_shot = true
autostart = true
[node name="retarget_timer" type="Timer" parent="Timers"]
wait_time = 2.0
[connection signal="body_part_hit" from="body/Area3D" to="." method="_on_area_3d_body_part_hit"]
[connection signal="timeout" from="Timers/prefire_timer" to="." method="_on_prefire_timer_timeout"]
[connection signal="timeout" from="Timers/postfire_timer" to="." method="_on_postfire_timer_timeout"]
[connection signal="timeout" from="Timers/retarget_timer" to="." method="_on_retarget_timer_timeout"]