Search Issue Tracker
In Progress
Fixed in 2021.3.15f1, 2023.1.0a20
Fix In Review for 2022.2.0f1
Unknown (hidden) 2019.4.X, 2020.3.X, 2022.1.X
Votes
0
Found in
2021.3.4f1
2022.2.0a16
Issue ID
UUM-7797
Regression
No
Incorrect near planeSize.y calculation at CameraEditorUtils.cs
In the 'TryGetSensorGateFrustum' method in the CameraEditorUtils.cs (https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/Mono/Inspector/CameraEditorUtils.cs) the near plane size calculation is different form far plane size and includes a typo.
Far: planeSize.y = camera.farClipPlane * Mathf.Tan(Mathf.Deg2Rad * camera.fieldOfView * 0.5f);
Near: planeSize.y = 2.0f * camera.nearClipPlane * Mathf.Tan(Mathf.Deg2Rad * camera.fieldOfView * 0.5f);
The near planeSize.y multiplication by 2 seems incorrect as it is not required and has not been spotted before as the near plane calculation is never called in any editor code and the near vector array is always passed in as null so the conditional check always skips that part of the code.
Reproducible with: 2019.4.39f1, 2020.3.35f1, 2021.3.4f1, 2022.1.3f1, 2022.2.0a16
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
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Resolution Note (2022.1.X):
Won't fix for this version.
Resolution Note (2020.3.X):
Won't fix for this version.
Resolution Note (2019.4.X):
Won't fix for this version.