fuzzyworld

godot-shooter / commit

Enemy sprite is 64x64, so setting nav radius to 35.

6a08f6b2934499f9a320bb8c5e5998dcb2e088f4 · Pavel Safronov · 2023-11-30 22:31:51 -0800 · parents 6ad40cea47bd

Enemy sprite is 64x64, so setting nav radius to 35.
 actors/Enemy.tscn  | 8 ++++----
 actors/Player.tscn | 2 +-
 scenes/World.gd    | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/actors/Enemy.tscn b/actors/Enemy.tscn
index 41b8cfe..affedab 100644
--- a/actors/Enemy.tscn
+++ b/actors/Enemy.tscn
@@ -143,10 +143,10 @@ polygon = PoolVector2Array( 0, -23, -7, 5, -12, 9, -19, 9, -23, 14, -23, 19, -19
 [node name="DamageObjects" type="Node2D" parent="."]
 
 [node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
-path_desired_distance = 10.0
-target_desired_distance = 50.0
+path_desired_distance = 35.0
+target_desired_distance = 35.0
 navigation_layers = 3
 avoidance_enabled = true
-radius = 50.0
-neighbor_dist = 300.0
+radius = 35.0
+neighbor_dist = 100.0
 max_speed = 50.0
diff --git a/actors/Player.tscn b/actors/Player.tscn
index 5d9591b..73d41f9 100644
--- a/actors/Player.tscn
+++ b/actors/Player.tscn
@@ -383,7 +383,7 @@ __meta__ = {
 
 [node name="NavigationObstacle2D" type="NavigationObstacle2D" parent="."]
 estimate_radius = false
-radius = 25.0
+radius = 35.0
 
 [connection signal="debug_signal" from="UI/HUD" to="." method="_on_HUD_debug_signal"]
 [connection signal="paused" from="UI/HUD" to="." method="_on_HUD_paused"]
diff --git a/scenes/World.gd b/scenes/World.gd
index 73c9128..f8388f3 100644
--- a/scenes/World.gd
+++ b/scenes/World.gd
@@ -12,7 +12,7 @@ onready var update_timer = $UpdateTimer
 onready var navigation_polygon_instance: NavigationPolygonInstance = $NavigationPolygonInstance
 
 var generators = [
-	ConstantItemGenerator.new("create_enemy", self, "enemies", 2),
+	ConstantItemGenerator.new("create_enemy", self, "enemies", 5),
 	ConstantItemGenerator.new("create_health", self, "health", 10),
 	ConstantItemGenerator.new("create_weapon", self, "weapon", 10),
 	ConstantItemGenerator.new("create_bomb", self, "bombs", 10),