Search Issue Tracker
Won't Fix
Votes
1
Found in
2017.2.0f3
Issue ID
976983
Regression
No
Physics.Raycast maxDistance field accepts LayerMask object as valid input when using Physics.Raycast()
To reproduce:
1. Open user's project, script Caster.cs
2. In line 33, observe the structure of Raycast
3. Enter Play mode
4. While in Play mode, you can toggle between Raycast maxDistance set and not set
Expected: editor doesn't compile as Raycast has a LayerMask type of object in the float field (check picture attached)
Actual: editor compiles and somehow still manages to cast a Ray with a maxDistance parameter type of LayerMask (check pictures)
Reproduced in: 5.5.5p2, 5.6.4p4, 2017.1.2p4, 2017.2.0p4, 2017.3.0f1, 2018.1.0a7
Note: any other in maxDistance field inserted different-typed objects were greeted with errors as intended
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment