summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-01-02 13:50:10 +0100
committerGitHub <noreply@github.com>2017-01-02 13:50:10 +0100
commit2e87232f0a6860c24926af10f0001092f3a582e5 (patch)
treeb9e48b798f9c16a2cdbd024143af672efbfbe24f /scene
parent0cf34cb3af710b6891d25263b03e4c7eb437af61 (diff)
parent2807507325c28a4b4f5128db5ee98f9a282fe5d1 (diff)
Merge pull request #7391 from ktksgit/master
Update DebugMesh when NavMesh changes
Diffstat (limited to 'scene')
-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 bb901d701e..25f675ac0c 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();