Unless I’m misunderstanding something, any colliders outside the Ground layer have to be excluded, and because of that, the only possible way to reach the Debug statement is when the collider is not tagged as “Ground” but still on the Ground layer. However, the log shows that colliders from other layers are also being hit.
So the question is: is this a bug, or there’s something I’m not seeing?
My fault… for anyone having a similar problem, if you’re using Visual Studio, do not, and I repeat, do not, trust blindly what intellisense tells you. When typing the raycast statement it showed me the next parameter was the layermask and I assumed that was correct, but no, it is the maximum distance.
It was my fault because I assumed IntelliSense was pointing to the right overload, and I didn’t read the whole implementation, so when I saw “layerMask” I just went ahead and typed the corresponding parameter.
Yeah, layer-mask not being a special type but rather an int is kind of a pain in this circrumstance as it naturually gets consumed by float args like distance. ;(