1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Portals - disable frustum culling gizmos with preview camera

When using the preview camera feature it turns out as well as culling the game objects, this also culls the editor gizmos from the preview camera, which makes the editor hard to use in this mode.

To get around this problem we simply disable frustum culling for GLOBAL portal_mode objects when in preview camera mode. This could be a bit slower in an editor scene with lots of gizmos but is the simplest way of solving the problem.
This commit is contained in:
lawnjelly
2021-07-31 07:53:17 +01:00
parent 78d9a4ae7e
commit 93c78af488
3 changed files with 39 additions and 19 deletions

View File

@@ -994,7 +994,7 @@ int PortalRenderer::cull_convex_implementation(const Vector3 &p_point, const Vec
return out_count;
}
out_count = _tracer.trace_globals(planes, p_result_array, out_count, p_result_max, p_mask);
out_count = _tracer.trace_globals(planes, p_result_array, out_count, p_result_max, p_mask, _override_camera);
return out_count;
}