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
- Shader Graph Asset icon is not shown on creation unless you confirm the name
- APV Sky occlusion doesn't consider the terrain
- [iOS] "EXC_BAD_ACCESS" Player crash when Script Debugging is enabled
- Cursor skips input fields when tabbing between two sets of input fields
- "Shader error redefinition of 'Varyings'" error appears when selecting the shader
Resolution Note:
Precision problem which is inevitable.