Update DebugMesh when NavMesh changes

Fixes #7371
This commit is contained in:
ktksgit 2016-12-29 12:16:36 +01:00 committed by GitHub
parent 86e428eea0
commit 2807507325

View file

@ -356,6 +356,11 @@ void NavigationMeshInstance::set_navigation_mesh(const Ref<NavigationMesh>& p_na
if (navigation && navmesh.is_valid() && enabled) { if (navigation && navmesh.is_valid() && enabled) {
nav_id = navigation->navmesh_create(navmesh,get_relative_transform(navigation),this); 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_gizmo();
update_configuration_warning(); update_configuration_warning();