summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorktksgit <zed-2006@web.de>2016-12-29 12:16:36 +0100
committerGitHub <noreply@github.com>2016-12-29 12:16:36 +0100
commit2807507325c28a4b4f5128db5ee98f9a282fe5d1 (patch)
tree2d5d21f36c52acb30fdde3b5386a3316a2795e1d
parent86e428eea0b9ef5c1732af3a5c29b5c365fbf6e8 (diff)
Update DebugMesh when NavMesh changes
Fixes #7371
-rw-r--r--scene/3d/navigation_mesh.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/3d/navigation_mesh.cpp b/scene/3d/navigation_mesh.cpp
index 386a0fab57..c08322e77d 100644
--- a/scene/3d/navigation_mesh.cpp
+++ b/scene/3d/navigation_mesh.cpp
@@ -356,6 +356,11 @@ void NavigationMeshInstance::set_navigation_mesh(const Ref<NavigationMesh>& p_na
if (navigation && navmesh.is_valid() && enabled) {
nav_id = navigation->navmesh_create(navmesh,get_relative_transform(navigation),this);
}
+
+ if (debug_view && navmesh.is_valid()) {
+ debug_view->cast_to<MeshInstance>()->set_mesh( navmesh->get_debug_mesh() );
+ }
+
update_gizmo();
update_configuration_warning();