Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.1.4p2
Issue ID
1083228
Regression
No
Camera.ViewportToWorldPoint doesn't always calculate very small numbers accurately
Reproduction steps:
1. Open "test_2018.zip" project
2. Open "test" scene
3. Enter Play Mode
4. Click on the Game Screen
5. Select the "Main Camera" in the Hierarchy window
6. Change the "Clipping Planes" value "Near" to '0.3'
7. Click on the Game Screen
8. Look at both the created Cubes
9. The first cube (Usually) has 2 x 2 lines
10. The second cube (Usually) has 11 x 11 lines
Expected Result: "Debug.DrawLines" draws 11 x 11 lines
Actual Result: "Debug.DrawLines" draws an uncertain amount of lines, because some of them overlap, due to "ViewportToWorldPoint" inaccurate calculations
Reproduced with: 2019.1.0a2, 2018.3.0b3, 2018.2.10f1, 2018.1.9f2, 2017.4.12f1|
Note:
Changing lines 54 and 55 in "testTransform" script from "... * 0.0001f;" to "... * 0.01f;" fixes the issue
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
- [Quest] Texture appears grey when doing CopyPass with Single Pass instanced rendering
- [Mac] Menu sometimes renders empty when using help
- Animation is not played when using Object.InstantiateAsync
- Meshes flicker when Wireframe Draw Mode is selected and Graphics API is set to Direct3D12
- [URP][XR] Spotlight shadows flicker when Deffered Rendering Path is selected and rotating the HDM view in XR
Resolution Note:
Precision problem which is inevitable.