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
- UxmlNamespacePrefix does not apply when using UIBuilder documents
- UI Builder Data Path Source List starts flickering and scrolling when trying to select the last item in the list
- Crash on ProcessSceneBeforeExport when analyzing selected Addressables rules in a specific project
- HDR images are compressed incorrectly with default settings on Android Platform
- Crash with multiple stack traces when painting detail on Terrain with a highly detailed Prefab
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.