diff options
| author | Juan Linietsky | 2015-09-20 13:03:46 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-09-20 13:03:46 -0300 |
| commit | 83d9a692be648668b5b363f2424c619e15639843 (patch) | |
| tree | 387b30810994b282c795fdd011f53f0b7eb93ace /tools/editor/editor_node.cpp | |
| parent | 3f9e5afe68df1e3b4bcf34a21468ed55a57a7973 (diff) | |
| parent | 889d21e0049a0e84d6d44db9b80193f93fd62f17 (diff) | |
| download | godot-83d9a692be648668b5b363f2424c619e15639843.tar.gz godot-83d9a692be648668b5b363f2424c619e15639843.tar.zst godot-83d9a692be648668b5b363f2424c619e15639843.zip | |
Ability to visually debug geometry visually:
-Visible 2D and 3D Shapes, Polygons, Tile collisions, etc.
-Visible Navmesh and Navpoly
-Visible collision contacts for 2D and 3D as a red point
-Customizable colors in project settings
Diffstat (limited to 'tools/editor/editor_node.cpp')
| -rw-r--r-- | tools/editor/editor_node.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 63684dcc9..03d1dfb74 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -2677,6 +2677,20 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { run_native->set_deploy_debug_remote(!ischecked); } break; + case RUN_DEBUG_COLLISONS: { + + bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_DEBUG_COLLISONS)); + debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_DEBUG_COLLISONS),!ischecked); + run_native->set_debug_collisions(!ischecked); + editor_run.set_debug_collisions(!ischecked); + } break; + case RUN_DEBUG_NAVIGATION: { + + bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION)); + debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION),!ischecked); + run_native->set_debug_navigation(!ischecked); + editor_run.set_debug_navigation(!ischecked); + } break; case SETTINGS_UPDATE_ALWAYS: { update_menu->get_popup()->set_item_checked(0,true); @@ -4955,6 +4969,9 @@ EditorNode::EditorNode() { p->add_separator(); p->add_check_item("Deploy Remote Debug",RUN_DEPLOY_REMOTE_DEBUG); p->add_check_item("Deploy File Server Clients",RUN_DEPLOY_DUMB_CLIENTS); + p->add_separator(); + p->add_check_item("Visible Collision Shapes",RUN_DEBUG_COLLISONS); + p->add_check_item("Visible Navigation",RUN_DEBUG_NAVIGATION); p->connect("item_pressed",this,"_menu_option"); /* |
