Basic enemy pathing implementation
This commit is contained in:
@@ -15,7 +15,6 @@ height = 1.67894
|
||||
script = ExtResource("1_hddqi")
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
||||
|
||||
[node name="fwitch" parent="Pivot" instance=ExtResource("4_n3637")]
|
||||
|
||||
|
||||
@@ -1,41 +1,61 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dkjdt7uq3a4j3"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dkjdt7uq3a4j3"]
|
||||
|
||||
[ext_resource type="ArrayMesh" uid="uid://d3u564wle888o" path="res://Models/TestModels/Ness/nesspoly.obj" id="1_jhe4l"]
|
||||
[ext_resource type="Script" path="res://Scripts/TestEnemy.cs" id="1_m03um"]
|
||||
[ext_resource type="PackedScene" uid="uid://rlxnnw4yay7e" path="res://Scenes/EnemyBullet.tscn" id="2_h68e2"]
|
||||
[ext_resource type="Script" path="res://Scripts/FireAtPlayer.cs" id="3_dhmfs"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_dgatw"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
"tilts": PackedFloat32Array(0, 0, 0)
|
||||
}
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eb41r"]
|
||||
radius = 1.0
|
||||
height = 3.5
|
||||
|
||||
[node name="TestEnemy" type="Node3D"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="."]
|
||||
[node name="Path3D" type="Path3D" parent="."]
|
||||
curve = SubResource("Curve3D_dgatw")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Path3D"]
|
||||
transform = Transform3D(0.999999, 0, 0, 0, 1, 0, 0, 0, 0.999999, 0, 0, 0)
|
||||
rotation_mode = 0
|
||||
cubic_interp = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="Path3D/PathFollow3D" node_paths=PackedStringArray("_pathFollow")]
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 10
|
||||
contact_monitor = true
|
||||
can_sleep = false
|
||||
script = ExtResource("1_m03um")
|
||||
_speed = 1.0
|
||||
_pathFollow = NodePath("..")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="RigidBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51635, 0)
|
||||
shape = SubResource("CapsuleShape3D_eb41r")
|
||||
|
||||
[node name="Nesspoly" type="MeshInstance3D" parent="RigidBody3D"]
|
||||
[node name="Nesspoly" type="MeshInstance3D" parent="Path3D/PathFollow3D/RigidBody3D"]
|
||||
transform = Transform3D(7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0)
|
||||
mesh = ExtResource("1_jhe4l")
|
||||
skeleton = NodePath("../..")
|
||||
skeleton = NodePath("../../../..")
|
||||
|
||||
[node name="Timer" type="Timer" parent="." node_paths=PackedStringArray("_enemy")]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Path3D/PathFollow3D/RigidBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.53674e-07, 1.51635, -9.53674e-07)
|
||||
shape = SubResource("CapsuleShape3D_eb41r")
|
||||
|
||||
[node name="Timer" type="Timer" parent="Path3D" node_paths=PackedStringArray("_enemy")]
|
||||
wait_time = 3.0
|
||||
autostart = true
|
||||
script = ExtResource("3_dhmfs")
|
||||
_enemy = NodePath("../RigidBody3D")
|
||||
_enemy = NodePath("../PathFollow3D/RigidBody3D")
|
||||
_fireProjectile = ExtResource("2_h68e2")
|
||||
|
||||
[connection signal="body_entered" from="RigidBody3D" to="RigidBody3D" method="OnHit"]
|
||||
[connection signal="tree_exiting" from="RigidBody3D" to="Timer" method="OnDied"]
|
||||
[connection signal="timeout" from="Timer" to="Timer" method="OnFireAtPlayer"]
|
||||
[connection signal="body_entered" from="Path3D/PathFollow3D/RigidBody3D" to="Path3D/PathFollow3D/RigidBody3D" method="OnHit"]
|
||||
[connection signal="tree_exiting" from="Path3D/PathFollow3D/RigidBody3D" to="Path3D/Timer" method="OnDied"]
|
||||
[connection signal="timeout" from="Path3D/Timer" to="Path3D/Timer" method="OnFireAtPlayer"]
|
||||
|
||||
@@ -33,14 +33,16 @@ script = ExtResource("1_blhn0")
|
||||
_spawnPoint = NodePath("SpawnPoint")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0, 1, 0, -1, 0, -0.0769171, 95.2611, -32.0601)
|
||||
transform = Transform3D(1, 0, 0, 0, 0.496974, 0.867765, 0, -0.867765, 0.496974, 0, 47.9461, -5.79899)
|
||||
projection = 1
|
||||
fov = 30.0
|
||||
size = 45.0
|
||||
|
||||
[node name="DebugCamera" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.821149, 0.570714, 0, -0.570714, 0.821149, -0.36148, 22.6449, 10.8421)
|
||||
|
||||
[node name="Fish Witch" parent="." groups=["Player"] instance=ExtResource("1_fwf6c")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 40.7459)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.64605, -18.4987)
|
||||
_speed = 10.0
|
||||
_fireProjectile = ExtResource("3_lmb02")
|
||||
_altFireProjectile = ExtResource("4_t522c")
|
||||
@@ -62,8 +64,6 @@ shape = SubResource("BoxShape3D_hr26o")
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.1248, 1.81661, -31.1077)
|
||||
shape = SubResource("BoxShape3D_hr26o")
|
||||
|
||||
[node name="levelTEST" parent="StaticBody3D" instance=ExtResource("2_afl3s")]
|
||||
|
||||
[node name="CollisionShape3D4" type="CollisionShape3D" parent="StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.42545)
|
||||
shape = SubResource("BoxShape3D_sjyl3")
|
||||
@@ -85,10 +85,10 @@ transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -48.90
|
||||
shape = SubResource("BoxShape3D_sjyl3")
|
||||
|
||||
[node name="TestEnemy" parent="." instance=ExtResource("3_ds7vi")]
|
||||
transform = Transform3D(0.998405, 0.0226647, 0.0517184, -0.0544217, 0.630486, 0.77429, -0.0150588, -0.775869, 0.630714, -20.5579, 5.52246, -43.2246)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20.5579, 5.52246, -43.2246)
|
||||
|
||||
[node name="SpawnPoint" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, -0.757998, 6.71652, -10.4768)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.757998, 6.71652, -10.4768)
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="."]
|
||||
collision_layer = 16
|
||||
@@ -105,3 +105,5 @@ shape = SubResource("CylinderShape3D_fa41j")
|
||||
[node name="Rock3" type="CollisionShape3D" parent="StaticBody3D2"]
|
||||
transform = Transform3D(0.999841, -0.0178538, 0, 0.0178538, 0.999841, 0, 0, 0, 1, -6.84036, 6.33278, -46.1737)
|
||||
shape = SubResource("CylinderShape3D_krlem")
|
||||
|
||||
[node name="levelTEST" parent="." instance=ExtResource("2_afl3s")]
|
||||
|
||||
Reference in New Issue
Block a user