Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2020.1.9f1
2021.1
Issue ID
1291016
Regression
No
Plane.GetDistanceToPoint returns '0' on build (reason: mesh normals stripped away on build)
How to reproduce it:
1. Open the attached project 'testit.zip' (use testit_FBX.zip if do not have Blender)
2. Load 'SampleScene' from 'Assets' > 'Scenes' folder
3. Enter Play mode
4. In the Game view, walk around the corridors and notice that the passages in the center don't have deadlocks
5. Notice that the 'Distance' value changes in the Console view
6. Leave the Play mode
7. Build and run the game
8. Walk around the corridors and check the corridors in the center in the Build
9. Open an 'Player.log' file from the 'C:\Users\username\AppData\LocalLow\DefaultCompany\testit' and pay attention to 'Distance:' values
Expected result: 'Distance' value changes in the 'Player.log' file. Deadlocks don't appear in the central corridors in Build
Actual result: 'Distance' value doesn't change and remains '0' in the 'Player.log' file. Deadlocks appear in the central corridors in Build
Reproducible with: 2018.4.30f1, 2019.4.16f1, 2020.1.17f1, 2020.2.0f1, 2021.1.0a9
Notes:
- Reproducible on Mac and Windows Standalone
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
- "Customize handled extensions" part in the External Tools settings tab is not aligned with other properties
- Editor Diagnostics foldouts do not open when clicked on the foldout title
- [UI Builder] Visual Elements are not placed at the mouse cursor position when Absolute Position Placement is enabled
- "Width" and "Height" text is misaligned with slider ends in Screen Match Mode Parameters section of Panel Settings Asset
- Editor does not quit when Editor is not in focus and any floating window is opened
Resolution Note:
"Optimize Mesh Data" player settings option was removing mesh normals that are otherwise unused by mesh materials, but the game logic script was relying on them being valid.