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 grid is moved after entering Play Mode
- Tile Palette Edit mode turns off in Play Mode
- The Editor crashes when Generating Font Atlas in the Font Asset Creator with “9999999999” padding and 256x256 Atlas Resolution
- [iOS] An “ArgumentNullException” error is thrown when GetIntroductoryPriceDictionary() method is called
- Font Import Settings documentation page is missing when the documentation button is pressed in the Inspector window
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.