Apparently, I am far too dumb to make the code examples in the docs work. I’m not getting any errors, it just doesn’t seem to work for me.
I need to see a functioning example so I can reverse engineer it.
Okay, I figured out that it’s working, as in the ray is going out and hitting the camera, so now I need to do layers. In the docs, layers have numbers, but in the properties window, layers have names.
The docs show a picture of a “Layers and Tags Settings” window with no instructions of where it is or how to get to it. I clicked everything I could and gave up looking for it.
I found that you have to create a physics settings asset to see the collision matrix, but it’s still not the right “Layers and Tag Settings” window to add anything or see the numbers I need.
I tried just guessing the number, and no number between 0 and 9 worked, so I suspect that even if I did find this unicorn window, knowing the right number for the layer wouldn’t matter.
I found the icon in the Settings folder you have to click to find the unicorn window, added a layer, and then changed the layermask code to, what I though, excluded layer 4. As I suspected trying to guess the number, it actually didn’t matter. It seems like if “layerMask: ~(1U << 3)” actually means " to only check collisions with colliders from layer3" then it should have worked the first time anyway.