diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-01 15:00:38 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-01 15:00:38 +0100 |
commit | d9a881b37cc96d2ddb113dd96c560a7febe99641 (patch) | |
tree | d916268f3f237e912733e71e4d35f8c9ba646bc8 | |
parent | 79005978b741fbc21069b1d0190257320146ebfe (diff) | |
parent | 785b5f4574a0c182dc7df7fd14bd6554800cbabe (diff) | |
download | redot-engine-d9a881b37cc96d2ddb113dd96c560a7febe99641.tar.gz |
Merge pull request #89009 from smix8/navobstacle_debug_visibility
Fix NavigationObstacle3D debug not reacting to visiblity changes
-rw-r--r-- | scene/3d/navigation_obstacle_3d.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index 82450927d3..96f7fb137c 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -132,6 +132,19 @@ void NavigationObstacle3D::_notification(int p_what) { NavigationServer3D::get_singleton()->obstacle_set_paused(obstacle, !can_process()); } break; +#ifdef DEBUG_ENABLED + case NOTIFICATION_VISIBILITY_CHANGED: { + if (is_inside_tree()) { + if (fake_agent_radius_debug_instance.is_valid()) { + RS::get_singleton()->instance_set_visible(fake_agent_radius_debug_instance, is_visible_in_tree()); + } + if (static_obstacle_debug_instance.is_valid()) { + RS::get_singleton()->instance_set_visible(static_obstacle_debug_instance, is_visible_in_tree()); + } + } + } break; +#endif // DEBUG_ENABLED + case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { if (is_inside_tree()) { _update_position(get_global_transform().origin); |