Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NavigationObstacle3D debug clear regression #101728

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion scene/3d/navigation_obstacle_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void NavigationObstacle3D::_notification(int p_what) {
set_physics_process_internal(false);
_update_map(RID());
#ifdef DEBUG_ENABLED
_update_debug();
_clear_debug();
#endif // DEBUG_ENABLED
} break;

Expand Down Expand Up @@ -633,3 +633,14 @@ void NavigationObstacle3D::_update_static_obstacle_debug() {
}
}
#endif // DEBUG_ENABLED

#ifdef DEBUG_ENABLED
void NavigationObstacle3D::_clear_debug() {
RenderingServer *rs = RenderingServer::get_singleton();
ERR_FAIL_NULL(rs);
rs->mesh_clear(fake_agent_radius_debug_mesh_rid);
rs->mesh_clear(static_obstacle_debug_mesh_rid);
rs->instance_set_scenario(fake_agent_radius_debug_instance_rid, RID());
rs->instance_set_scenario(static_obstacle_debug_instance_rid, RID());
}
#endif // DEBUG_ENABLED
1 change: 1 addition & 0 deletions scene/3d/navigation_obstacle_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class NavigationObstacle3D : public Node3D {
void _update_debug();
void _update_fake_agent_radius_debug();
void _update_static_obstacle_debug();
void _clear_debug();
#endif // DEBUG_ENABLED

protected:
Expand Down