I want to cast a ray with the same collision properties that it would have, if it were an object on a specific layer. The raycast should hit anything that object would collide with, and ignore everything that object would pass through.
I can manually copy this information and hardcode it, but that seems wrong, especially since i’d have to update that if i change the collision settings later
Is there any script command where i can specify a layer, and it’ll return a layermask for how that layer collides with others?