Support for RayCasting with Layers?

I used ray casting filtering in an old project that I don’t have access anymore but this was the minified source code Raycast through multiple entities