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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Add comment