Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2019.4.17f1
2020.2
2021.1
2021.2
Issue ID
1305368
Regression
No
GeometryUtility.CalculateFrustumPlanes/TestPlanesAABB returns true when the AABB is not in the frustum
Reproduction steps:
1. Open the attached project "PlaneCheckRepro.zip"
2. Open "SampleScene" scene
3. Select the Main Camera gameObject to see the frustum
4. Enter Play mode
5. Observe the debug image in the left top
Expected result: Debug image becomes stays red when the AABB is not in the frustum
Actual result: Debug image becomes green when the AABB is not in the frustum
Reproducible with: 2019.4.18f1, 2020.2.2f1, 2021.1.0a10, 2021.2.0a1
Could not test (Editor errors) - 2018.4
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Tile Palette selected dropdown text does not update when palette is renamed
- ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
- [iOS][WebGL] Player freezes when multiple properties of a VisualElement are changed at the same time
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
Resolution Note:
This test is a conservative bounds check (can contain false positives) against 6 frustum planes. These planes extend beyond the actual frustum and therefore a large object outside of the frustum (typically near frustum corner/edge) can still intersect the planes and give a positive (inside) result. Typically this is acceptable. If it's not then you can improve the accuracy of the plane test by doing extra tests or test against the actual frustum instead of the planes.
I would recommend this great article by Inigo Quilez: https://www.iquilezles.org/www/articles/frustumcorrect/frustumcorrect.htm to help implementing an improved test if needed.