Adjust navigation avoidance code so that enemies attempt to avoid each other

This commit is contained in:
2026-06-13 13:17:01 -07:00
parent f55d7935f6
commit 7b2483ee74
26 changed files with 102 additions and 57 deletions
@@ -46,6 +46,7 @@ public partial class FleeBehavior : Node3D, IBehavior
public void StopFlee() public void StopFlee()
{ {
SetPhysicsProcess(false); SetPhysicsProcess(false);
_navigationAgent.Velocity = Vector3.Zero;
} }
public void OnPhysicsProcess(double delta) public void OnPhysicsProcess(double delta)
@@ -53,6 +54,7 @@ public partial class FleeBehavior : Node3D, IBehavior
var nextVelocity = _navigationAgent.GetNextPathPosition(); var nextVelocity = _navigationAgent.GetNextPathPosition();
var parent = GetParent() as Node3D; var parent = GetParent() as Node3D;
var velocity = parent.GlobalPosition.DirectionTo(nextVelocity) * (float)FleeSpeed * (float)delta; var velocity = parent.GlobalPosition.DirectionTo(nextVelocity) * (float)FleeSpeed * (float)delta;
EmitSignal(SignalName.OnVelocityComputed, velocity); _navigationAgent.Velocity = velocity;
//EmitSignal(SignalName.OnVelocityComputed, velocity);
} }
} }
@@ -27,6 +27,12 @@ public partial class FollowBehavior : Node3D, IBehavior
public void Init(NavigationAgent3D navigationAgent) public void Init(NavigationAgent3D navigationAgent)
{ {
_navigationAgent = navigationAgent; _navigationAgent = navigationAgent;
_navigationAgent.VelocityComputed += _navigationAgent_VelocityComputed;
}
private void _navigationAgent_VelocityComputed(Vector3 safeVelocity)
{
EmitSignal(SignalName.OnVelocityComputed, safeVelocity);
} }
public void OnReady() public void OnReady()
@@ -50,6 +56,7 @@ public partial class FollowBehavior : Node3D, IBehavior
{ {
SetPhysicsProcess(false); SetPhysicsProcess(false);
_thinkTimer.Stop(); _thinkTimer.Stop();
_navigationAgent.Velocity = Vector3.Zero;
} }
public void OnPhysicsProcess(double delta) public void OnPhysicsProcess(double delta)
@@ -57,12 +64,13 @@ public partial class FollowBehavior : Node3D, IBehavior
var nextVelocity = _navigationAgent.GetNextPathPosition(); var nextVelocity = _navigationAgent.GetNextPathPosition();
var parent = GetParent() as Node3D; var parent = GetParent() as Node3D;
var velocity = parent.GlobalPosition.DirectionTo(nextVelocity) * (float)FollowSpeed * (float)delta; var velocity = parent.GlobalPosition.DirectionTo(nextVelocity) * (float)FollowSpeed * (float)delta;
EmitSignal(SignalName.OnVelocityComputed, velocity); _navigationAgent.Velocity = velocity;
} }
public void OnExitTree() public void OnExitTree()
{ {
_thinkTimer.Stop(); _thinkTimer.Stop();
_thinkTimer.Timeout -= OnTimeout; _thinkTimer.Timeout -= OnTimeout;
_navigationAgent.VelocityComputed -= _navigationAgent_VelocityComputed;
} }
} }
@@ -49,6 +49,12 @@ public partial class PatrolBehavior : Node3D, IBehavior
{ {
_navigationAgent = navigationAgent; _navigationAgent = navigationAgent;
_navigationAgent.WaypointReached += NavigationAgent_WaypointReached; _navigationAgent.WaypointReached += NavigationAgent_WaypointReached;
_navigationAgent.VelocityComputed += _navigationAgent_VelocityComputed;
}
private void _navigationAgent_VelocityComputed(Vector3 safeVelocity)
{
EmitSignal(SignalName.OnVelocityComputed, safeVelocity);
} }
private async void NavigationAgent_WaypointReached(Dictionary details) private async void NavigationAgent_WaypointReached(Dictionary details)
@@ -66,6 +72,7 @@ public partial class PatrolBehavior : Node3D, IBehavior
{ {
SetPhysicsProcess(false); SetPhysicsProcess(false);
_patrolTimer?.Stop(); _patrolTimer?.Stop();
_navigationAgent.Velocity = Vector3.Zero;
} }
public void OnPhysicsProcess(double delta) public void OnPhysicsProcess(double delta)
@@ -73,7 +80,7 @@ public partial class PatrolBehavior : Node3D, IBehavior
var nextVelocity = _navigationAgent.GetNextPathPosition(); var nextVelocity = _navigationAgent.GetNextPathPosition();
var parent = GetParent() as Node3D; var parent = GetParent() as Node3D;
var velocity = parent.GlobalPosition.DirectionTo(nextVelocity) * (float)PatrolSpeed * (float)delta; var velocity = parent.GlobalPosition.DirectionTo(nextVelocity) * (float)PatrolSpeed * (float)delta;
EmitSignal(SignalName.OnVelocityComputed, velocity); _navigationAgent.Velocity = velocity;
} }
public void SetPatrolTarget() public void SetPatrolTarget()
@@ -94,5 +101,6 @@ public partial class PatrolBehavior : Node3D, IBehavior
_patrolTimer.Stop(); _patrolTimer.Stop();
_patrolTimer.Timeout -= PatrolTimer_Timeout; _patrolTimer.Timeout -= PatrolTimer_Timeout;
_navigationAgent.WaypointReached -= NavigationAgent_WaypointReached; _navigationAgent.WaypointReached -= NavigationAgent_WaypointReached;
_navigationAgent.VelocityComputed -= _navigationAgent_VelocityComputed;
} }
} }
@@ -40,7 +40,7 @@ material = SubResource("StandardMaterial3D_p4gkk")
top_radius = 0.0 top_radius = 0.0
[sub_resource type="CylinderShape3D" id="CylinderShape3D_drfkj"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_drfkj"]
radius = 1.0 radius = 1.33398
[node name="Sproingy" type="CharacterBody3D" groups=["enemy"]] [node name="Sproingy" type="CharacterBody3D" groups=["enemy"]]
process_mode = 1 process_mode = 1
@@ -107,6 +107,7 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("6_moun4")] [node name="FollowBehavior" parent="Components" instance=ExtResource("6_moun4")]
unique_name_in_owner = true unique_name_in_owner = true
FollowSpeed = 175.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("5_drfkj")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("5_drfkj")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -116,7 +117,9 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 3.0 use_3d_avoidance = true
avoidance_layers = 9
avoidance_mask = 9
[node name="SFX" type="Node3D" parent="."] [node name="SFX" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.0617, 0)
@@ -19,7 +19,7 @@ radius = 0.34933
height = 2.66932 height = 2.66932
[sub_resource type="CylinderShape3D" id="CylinderShape3D_eek1b"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_eek1b"]
radius = 1.0 radius = 1.51025
[sub_resource type="SphereShape3D" id="SphereShape3D_wrps7"] [sub_resource type="SphereShape3D" id="SphereShape3D_wrps7"]
radius = 0.552847 radius = 0.552847
@@ -90,13 +90,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.71715, 0)
[node name="PatrolBehavior" parent="Components" instance=ExtResource("5_fkx5j")] [node name="PatrolBehavior" parent="Components" instance=ExtResource("5_fkx5j")]
unique_name_in_owner = true unique_name_in_owner = true
_patrolSpeed = 60.0
_patrolRange = 15.0 _patrolRange = 15.0
_patrolTime = 20.0 _patrolTime = 20.0
[node name="FollowBehavior" parent="Components" instance=ExtResource("6_bun8r")] [node name="FollowBehavior" parent="Components" instance=ExtResource("6_bun8r")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0 FollowSpeed = 175.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("7_x8mrp")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("7_x8mrp")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -107,7 +106,9 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 3.0 use_3d_avoidance = true
avoidance_layers = 9
avoidance_mask = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.71715, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.71715, 0)
@@ -112,8 +112,9 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
height = 2.0 use_3d_avoidance = true
radius = 3.0 avoidance_layers = 9
avoidance_mask = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.25757, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.25757, 0)
@@ -89,7 +89,6 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("5_lxgpb")] [node name="FollowBehavior" parent="Components" instance=ExtResource("5_lxgpb")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_ddchx")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_ddchx")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -98,7 +97,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95329, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.95329, 0)
@@ -93,7 +93,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
@@ -26,8 +26,12 @@ ATK = ""
DEF = "" DEF = ""
Affinity = "" Affinity = ""
Weakness = "" Weakness = ""
Drop1 = "" PrimaryAttackName = ""
Drop2 = "" PrimaryAttackType = 0
SecondaryAttackName = ""
SecondaryAttackType = 0
TertiaryAttackName = ""
TertiaryAttackType = 0
metadata/_custom_type_script = "uid://dlsgyx4i1jmp3" metadata/_custom_type_script = "uid://dlsgyx4i1jmp3"
[sub_resource type="SphereShape3D" id="SphereShape3D_8vcnq"] [sub_resource type="SphereShape3D" id="SphereShape3D_8vcnq"]
@@ -97,7 +101,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.46013, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.46013, 0)
@@ -12,11 +12,12 @@
[ext_resource type="AudioStream" uid="uid://6aje2myxas3d" path="res://src/audio/sfx/enemy_ambassador_aggro.ogg" id="10_sjoyv"] [ext_resource type="AudioStream" uid="uid://6aje2myxas3d" path="res://src/audio/sfx/enemy_ambassador_aggro.ogg" id="10_sjoyv"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
radius = 0.106078 radius = 0.9672
height = 1.23076 height = 3.20843
[sub_resource type="SphereShape3D" id="SphereShape3D_8vcnq"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_sjoyv"]
radius = 0.57308 radius = 0.908537
height = 3.36877
[sub_resource type="CylinderShape3D" id="CylinderShape3D_jbgmx"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_jbgmx"]
height = 5.0 height = 5.0
@@ -47,7 +48,7 @@ collision_layer = 2048
collision_mask = 0 collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Collision/Collision"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Collision/Collision"]
shape = SubResource("SphereShape3D_8vcnq") shape = SubResource("CapsuleShape3D_sjoyv")
[node name="LineOfSight" type="Area3D" parent="Collision"] [node name="LineOfSight" type="Area3D" parent="Collision"]
unique_name_in_owner = true unique_name_in_owner = true
@@ -89,7 +90,6 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("5_gy5yi")] [node name="FollowBehavior" parent="Components" instance=ExtResource("5_gy5yi")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_7f1qq")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_7f1qq")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -98,7 +98,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_mask = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.29778, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.29778, 0)
@@ -88,7 +88,6 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("6_v4xmn")] [node name="FollowBehavior" parent="Components" instance=ExtResource("6_v4xmn")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("7_a21yr")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("7_a21yr")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -97,7 +96,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.69068, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.69068, 0)
@@ -285,8 +285,12 @@ ATK = ""
DEF = "" DEF = ""
Affinity = "" Affinity = ""
Weakness = "" Weakness = ""
Drop1 = "" PrimaryAttackName = ""
Drop2 = "" PrimaryAttackType = 0
SecondaryAttackName = ""
SecondaryAttackType = 0
TertiaryAttackName = ""
TertiaryAttackType = 0
metadata/_custom_type_script = "uid://dlsgyx4i1jmp3" metadata/_custom_type_script = "uid://dlsgyx4i1jmp3"
[sub_resource type="ViewportTexture" id="ViewportTexture_h1kaf"] [sub_resource type="ViewportTexture" id="ViewportTexture_h1kaf"]
@@ -87,7 +87,6 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("6_g5uri")] [node name="FollowBehavior" parent="Components" instance=ExtResource("6_g5uri")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("7_5r3ee")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("7_5r3ee")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -96,7 +95,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.32738, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.32738, 0)
@@ -81,7 +81,6 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("5_j6ob5")] [node name="FollowBehavior" parent="Components" instance=ExtResource("5_j6ob5")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_58r4a")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_58r4a")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -90,7 +89,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 3.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.65049, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.65049, 0)
@@ -82,7 +82,6 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("5_6scof")] [node name="FollowBehavior" parent="Components" instance=ExtResource("5_6scof")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_oy46w")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_oy46w")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -91,7 +90,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.93241, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.93241, 0)
@@ -91,7 +91,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.71346, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.71346, 0)
@@ -103,7 +103,8 @@ FleeSpeed = 800.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 3.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="SFX" type="Node3D" parent="."] [node name="SFX" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09874, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09874, 0)
@@ -60,7 +60,6 @@ shape = SubResource("CylinderShape3D_wp4vi")
[node name="FollowBehavior" parent="Components" instance=ExtResource("3_wp4vi")] [node name="FollowBehavior" parent="Components" instance=ExtResource("3_wp4vi")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("4_fne8i")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("4_fne8i")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -68,7 +67,9 @@ unique_name_in_owner = true
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 radius = 5.0
use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
@@ -61,7 +61,6 @@ shape = SubResource("CylinderShape3D_ow3fn")
[node name="FollowBehavior" parent="Components" instance=ExtResource("3_ow3fn")] [node name="FollowBehavior" parent="Components" instance=ExtResource("3_ow3fn")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("4_lwyi7")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("4_lwyi7")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -69,7 +68,9 @@ unique_name_in_owner = true
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 radius = 5.0
use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
@@ -81,7 +81,6 @@ unique_name_in_owner = true
[node name="FollowBehavior" parent="Components" instance=ExtResource("5_ha827")] [node name="FollowBehavior" parent="Components" instance=ExtResource("5_ha827")]
unique_name_in_owner = true unique_name_in_owner = true
_followSpeed = 150.0
[node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_7afhy")] [node name="EngagePlayerBehavior" parent="Components" instance=ExtResource("6_7afhy")]
unique_name_in_owner = true unique_name_in_owner = true
@@ -90,7 +89,8 @@ _acquireTargetTime = 2.0
[node name="NavigationAgent" type="NavigationAgent3D" parent="Components"] [node name="NavigationAgent" type="NavigationAgent3D" parent="Components"]
unique_name_in_owner = true unique_name_in_owner = true
avoidance_enabled = true avoidance_enabled = true
radius = 1.0 use_3d_avoidance = true
avoidance_layers = 9
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09575, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09575, 0)
@@ -20,7 +20,7 @@ size = Vector3(12.0027, 3.9892, 0.1)
size = Vector3(4.00874, 3.9892, 0.1) size = Vector3(4.00874, 3.9892, 0.1)
[sub_resource type="BoxShape3D" id="BoxShape3D_yyl46"] [sub_resource type="BoxShape3D" id="BoxShape3D_yyl46"]
size = Vector3(7.97935, 11.9599, 0.1) size = Vector3(9.84567, 13.9734, 0.1)
[sub_resource type="BoxShape3D" id="BoxShape3D_m8xpi"] [sub_resource type="BoxShape3D" id="BoxShape3D_m8xpi"]
size = Vector3(3.97492, 3.98102, 3.88313) size = Vector3(3.97492, 3.98102, 3.88313)
@@ -58,7 +58,7 @@ transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 3.9636
shape = SubResource("BoxShape3D_qf6fl") shape = SubResource("BoxShape3D_qf6fl")
[node name="CollisionShape3D3" type="CollisionShape3D" parent="Collisions/StaticBody3D"] [node name="CollisionShape3D3" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 4.00187, -0.0448335, -6.00208) transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 4.02484, -0.0448335, -6.0043)
shape = SubResource("BoxShape3D_yyl46") shape = SubResource("BoxShape3D_yyl46")
[node name="Room" type="Node3D" parent="."] [node name="Room" type="Node3D" parent="."]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
[ext_resource type="Texture2D" uid="uid://dw50ys561j8no" path="res://src/map/assets/DUST_1.png" id="5_6mfs2"] [ext_resource type="Texture2D" uid="uid://dw50ys561j8no" path="res://src/map/assets/DUST_1.png" id="5_6mfs2"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hfmc7"] [sub_resource type="BoxShape3D" id="BoxShape3D_hfmc7"]
size = Vector3(0.239136, 18.7304, 24.5964) size = Vector3(0.239136, 18.7304, 24.5605)
[sub_resource type="CylinderShape3D" id="CylinderShape3D_qjo7v"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_qjo7v"]
height = 17.4449 height = 17.4449
@@ -36,7 +36,7 @@ height = 4.7168
radius = 0.452637 radius = 0.452637
[sub_resource type="BoxShape3D" id="BoxShape3D_pqndw"] [sub_resource type="BoxShape3D" id="BoxShape3D_pqndw"]
size = Vector3(52.1012, 0.001, 52.1391) size = Vector3(53.1275, 0.001, 53.6021)
[sub_resource type="BoxShape3D" id="BoxShape3D_d346t"] [sub_resource type="BoxShape3D" id="BoxShape3D_d346t"]
size = Vector3(52.9172, 20.1017, 52.3729) size = Vector3(52.9172, 20.1017, 52.3729)
@@ -101,11 +101,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.84883, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -68.4636, 4.25, 34.382) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -68.4636, 4.25, 34.382)
[node name="CollisionShape3D3" type="CollisionShape3D" parent="Collisions/StaticBody3D"] [node name="CollisionShape3D3" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 94.5014, 6.68126, -49.2063) transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 94.5014, 6.68126, -48.9983)
shape = SubResource("BoxShape3D_hfmc7") shape = SubResource("BoxShape3D_hfmc7")
[node name="CollisionShape3D4" type="CollisionShape3D" parent="Collisions/StaticBody3D"] [node name="CollisionShape3D4" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 94.5014, 6.68126, -19.8211) transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 94.5014, 6.68126, -20.4007)
shape = SubResource("BoxShape3D_hfmc7") shape = SubResource("BoxShape3D_hfmc7")
[node name="CollisionShape3D5" type="CollisionShape3D" parent="Collisions/StaticBody3D"] [node name="CollisionShape3D5" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
@@ -221,7 +221,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 65.8124, -0.00124025, -60.197
shape = SubResource("CylinderShape3D_x0sr3") shape = SubResource("CylinderShape3D_x0sr3")
[node name="CollisionShape3D33" type="CollisionShape3D" parent="Collisions/StaticBody3D"] [node name="CollisionShape3D33" type="CollisionShape3D" parent="Collisions/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 68.5365, -2.06627, -34.4811) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 68.5792, -2.06627, -34.4092)
shape = SubResource("BoxShape3D_pqndw") shape = SubResource("BoxShape3D_pqndw")
[node name="Spawn Points" type="Node3D" parent="."] [node name="Spawn Points" type="Node3D" parent="."]
@@ -271,7 +271,7 @@ shape = SubResource("BoxShape3D_d346t")
unique_name_in_owner = true unique_name_in_owner = true
[node name="MeshInstance3D" type="MeshInstance3D" parent="Room/MinimapShadow"] [node name="MeshInstance3D" type="MeshInstance3D" parent="Room/MinimapShadow"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.020082, -2.09774, 0.0293603) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.020082, 0.807891, 0.0293603)
layers = 2 layers = 2
sorting_offset = 100.0 sorting_offset = 100.0
mesh = SubResource("PlaneMesh_hfmc7") mesh = SubResource("PlaneMesh_hfmc7")
@@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://5cstpejxygy6"] [gd_scene load_steps=15 format=3 uid="uid://5cstpejxygy6"]
[ext_resource type="Script" uid="uid://dhollu4j3pynq" path="res://src/map/dungeon/code/MonsterRoom.cs" id="2_i2lux"] [ext_resource type="Script" uid="uid://dhollu4j3pynq" path="res://src/map/dungeon/code/MonsterRoom.cs" id="2_i2lux"]
[ext_resource type="PackedScene" uid="uid://bglktekocmksl" path="res://src/map/dungeon/models/Area 2/CircleColumn/A2-CircleColumn.glb" id="2_nqsfp"] [ext_resource type="PackedScene" uid="uid://bglktekocmksl" path="res://src/map/dungeon/models/Area 2/CircleColumn/A2-CircleColumn.glb" id="2_nqsfp"]
@@ -10,6 +10,9 @@ size = Vector3(1.49561, 4.7276, 1.23734)
[sub_resource type="BoxShape3D" id="BoxShape3D_k267b"] [sub_resource type="BoxShape3D" id="BoxShape3D_k267b"]
size = Vector3(7.98608, 8.00006, 3.28333) size = Vector3(7.98608, 8.00006, 3.28333)
[sub_resource type="BoxShape3D" id="BoxShape3D_icta1"]
size = Vector3(20.7874, 0.116821, 20.5842)
[sub_resource type="BoxShape3D" id="BoxShape3D_6sers"] [sub_resource type="BoxShape3D" id="BoxShape3D_6sers"]
size = Vector3(20, 6, 20) size = Vector3(20, 6, 20)
@@ -164,6 +167,10 @@ shape = SubResource("BoxShape3D_k267b")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.96413, 1.98154, -8.27569) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.96413, 1.98154, -8.27569)
shape = SubResource("BoxShape3D_k267b") shape = SubResource("BoxShape3D_k267b")
[node name="CollisionShape3D25" type="CollisionShape3D" parent="Collisions/StaticBody3D2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.157593, -2.04195, 0.142212)
shape = SubResource("BoxShape3D_icta1")
[node name="Spawn Points" type="Node3D" parent="."] [node name="Spawn Points" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.65001, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.65001, 0)
@@ -39,7 +39,7 @@ albedo_color = Color(0, 0, 0, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_kx0t3"] [sub_resource type="PlaneMesh" id="PlaneMesh_kx0t3"]
material = SubResource("StandardMaterial3D_k6ywg") material = SubResource("StandardMaterial3D_k6ywg")
size = Vector2(8, 26) size = Vector2(16, 52)
[sub_resource type="Curve" id="Curve_d13sj"] [sub_resource type="Curve" id="Curve_d13sj"]
_limits = [-2.0, 2.0, 0.0, 1.0] _limits = [-2.0, 2.0, 0.0, 1.0]
@@ -564,7 +564,7 @@ shape = SubResource("BoxShape3D_wu8s2")
unique_name_in_owner = true unique_name_in_owner = true
[node name="MeshInstance3D" type="MeshInstance3D" parent="Room/MinimapShadow"] [node name="MeshInstance3D" type="MeshInstance3D" parent="Room/MinimapShadow"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.020082, -2.41028, 3.41991) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.020082, -2.41028, -9.22652)
layers = 2 layers = 2
sorting_offset = 100.0 sorting_offset = 100.0
mesh = SubResource("PlaneMesh_kx0t3") mesh = SubResource("PlaneMesh_kx0t3")