raycast ignore layer by default not using layermask.

Similar answers to this question have been given but they all involve using a layermask with your raycast.

Is there a way to make a custom layer ignore raycast by default the same way as the ignore raycast layer works?

Thanks Ken.

Kind of answered my own question straight after I posted it lol.

although not the perfect answer works in my case.

You can set raycasts to ignore triggers in project settings.

However i will still like to know if there is a way to do this if the mesh isnt a trigger if someone knows.