How do i make my own ignore raycast user layer?

Hello! I am trying to make an ignore raycast user layer. How do i do that? Or. Is it even possible? I’m new to raycasting…

You mean, you need a raycast that ignores player?

If you’re new to that type of thing there is the solution:

Create layerMask variable

Go to Edit->ProjectSetting->Layers and tags

Create a layer, assign it to your player gameobject. (You can find object’s layer at top of inspector, under the name field)

Get your layer number and do

 layerMask = ~(1 << 8);

Then, use your layermask in raycasting:

Physics.Raycast(position, direction, Hit, Range, layerMask)

That should work.