You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Rework Navigation Avoidance
Rework Navigation Avoidance.
This commit is contained in:
@@ -209,6 +209,7 @@ static bool use_debug_profiler = false;
|
||||
static bool debug_collisions = false;
|
||||
static bool debug_paths = false;
|
||||
static bool debug_navigation = false;
|
||||
static bool debug_avoidance = false;
|
||||
#endif
|
||||
static int frame_delay = 0;
|
||||
static bool disable_render_loop = false;
|
||||
@@ -456,6 +457,7 @@ void Main::print_help(const char *p_binary) {
|
||||
OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n");
|
||||
OS::get_singleton()->print(" --debug-paths Show path lines when running the scene.\n");
|
||||
OS::get_singleton()->print(" --debug-navigation Show navigation polygons when running the scene.\n");
|
||||
OS::get_singleton()->print(" --debug-avoidance Show navigation polygons when running the scene.\n");
|
||||
OS::get_singleton()->print(" --debug-stringnames Print all StringName allocations to stdout when the engine quits.\n");
|
||||
#endif
|
||||
OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
|
||||
@@ -1308,6 +1310,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
debug_paths = true;
|
||||
} else if (I->get() == "--debug-navigation") {
|
||||
debug_navigation = true;
|
||||
} else if (I->get() == "--debug-avoidance") {
|
||||
debug_avoidance = true;
|
||||
} else if (I->get() == "--debug-stringnames") {
|
||||
StringName::set_debug_stringnames(true);
|
||||
#endif
|
||||
@@ -2846,8 +2850,19 @@ bool Main::start() {
|
||||
}
|
||||
if (debug_navigation) {
|
||||
sml->set_debug_navigation_hint(true);
|
||||
}
|
||||
if (debug_avoidance) {
|
||||
sml->set_debug_avoidance_hint(true);
|
||||
}
|
||||
if (debug_navigation || debug_avoidance) {
|
||||
NavigationServer3D::get_singleton()->set_active(true);
|
||||
NavigationServer3D::get_singleton()->set_debug_enabled(true);
|
||||
if (debug_navigation) {
|
||||
NavigationServer3D::get_singleton()->set_debug_navigation_enabled(true);
|
||||
}
|
||||
if (debug_avoidance) {
|
||||
NavigationServer3D::get_singleton()->set_debug_avoidance_enabled(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user