From a6ac305f967a272c35f984b046517629a401b688 Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Tue, 10 Jan 2023 07:14:16 +0100 Subject: Rework Navigation Avoidance Rework Navigation Avoidance. --- modules/navigation/SCsub | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'modules/navigation/SCsub') diff --git a/modules/navigation/SCsub b/modules/navigation/SCsub index a9277657f4..46bcb0fba4 100644 --- a/modules/navigation/SCsub +++ b/modules/navigation/SCsub @@ -33,12 +33,14 @@ if env["builtin_recastnavigation"]: env_thirdparty.disable_warnings() env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) -# RVO Thirdparty source files -if env["builtin_rvo2"]: - thirdparty_dir = "#thirdparty/rvo2/" +# RVO 2D Thirdparty source files +if env["builtin_rvo2_2d"]: + thirdparty_dir = "#thirdparty/rvo2/rvo2_2d/" thirdparty_sources = [ - "Agent.cpp", - "KdTree.cpp", + "Agent2d.cpp", + "Obstacle2d.cpp", + "KdTree2d.cpp", + "RVOSimulator2d.cpp", ] thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] @@ -48,9 +50,24 @@ if env["builtin_rvo2"]: env_thirdparty.disable_warnings() env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) +# RVO 3D Thirdparty source files +if env["builtin_rvo2_3d"]: + thirdparty_dir = "#thirdparty/rvo2/rvo2_3d/" + thirdparty_sources = [ + "Agent3d.cpp", + "KdTree3d.cpp", + "RVOSimulator3d.cpp", + ] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] -env.modules_sources += thirdparty_obj + env_navigation.Prepend(CPPPATH=[thirdparty_dir]) + env_thirdparty = env_navigation.Clone() + env_thirdparty.disable_warnings() + env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) + + +env.modules_sources += thirdparty_obj # Godot source files -- cgit v1.2.3