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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Add comment