"Valid Raycast Target" as a property/toggleable

This week I ran into the bug of invisible voxel meshes not getting hit by raycasts, which I ended up actually using to my advantage.

It made me realize it would be nice to have an api call (and maybe an editor property) to toggle if a given entity should automatically be ignored by raycasts. There are lots of workarounds to this of course, but if you happen to be messing around with raycast functionality to bug fix I wonder how hard this would be to add? :angel: