From d7441eade9e8cfebb3e7adf645356fd09cf4b128 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 9 Aug 2024 17:56:39 +0200 Subject: [PATCH] feat: enemy and player units are now each in their own avoidance layers --- godot/GameObjects/enemy_unit.tscn | 5 ++--- godot/GameObjects/player_unit.tscn | 5 ++--- godot/project.godot | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/godot/GameObjects/enemy_unit.tscn b/godot/GameObjects/enemy_unit.tscn index f8f7e5f..b1408d4 100644 --- a/godot/GameObjects/enemy_unit.tscn +++ b/godot/GameObjects/enemy_unit.tscn @@ -46,9 +46,8 @@ path_desired_distance = 0.5 target_desired_distance = 0.2 path_height_offset = 0.5 avoidance_enabled = true -radius = 0.75 -time_horizon_agents = 4.0 -time_horizon_obstacles = 4.0 +avoidance_layers = 2 +avoidance_mask = 3 debug_enabled = true debug_path_custom_color = Color(0, 0.588235, 0.270588, 1) diff --git a/godot/GameObjects/player_unit.tscn b/godot/GameObjects/player_unit.tscn index 849cf56..0ba9c3d 100644 --- a/godot/GameObjects/player_unit.tscn +++ b/godot/GameObjects/player_unit.tscn @@ -39,9 +39,8 @@ path_desired_distance = 0.2 target_desired_distance = 0.5 path_height_offset = 0.5 avoidance_enabled = true -radius = 0.75 -time_horizon_agents = 4.0 -time_horizon_obstacles = 4.0 +avoidance_layers = 4 +avoidance_mask = 5 debug_enabled = true debug_path_custom_point_size = 7.0 diff --git a/godot/project.godot b/godot/project.godot index 63dbb3b..ec3b0ae 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -93,3 +93,6 @@ DEBUG_toggle_debug={ 3d_physics/layer_1="Default" 3d_physics/layer_2="Units" 3d_physics/layer_3="Objects" +avoidance/layer_1="Objects" +avoidance/layer_2="Enemy Units" +avoidance/layer_3="Player Units"