Is there already a option to use layers for colliders / rigidbodies? Or can exclude a entity with a collider and rigidbody to collision other entity with collider and dynamic rigidbody?
There are ways to do this but I don’t think we have an official API or documentation for this yet. I have an example kicking around on the forums somewhere.
Ah, here’s the post: Layer-based raycast?
Hay @yaustar! I’ve tried that way before, but as far as I can remember every object needs a script and it was a bit difficult for me to keep track of everything. But I will look at it again or else I will look for another solution. Thanks!
There’s several ways you could change it. Rather than setting the layers and masks per object, you can make it so that certain masks and layers are applied per object type (which can be done by using entity tags or an enum drop down in the script attribute).
And does that happen to have also an effect on a raycast?
I can’t remember tbh. I think there were some issues and therefore had to write my own raycast with a layer filter Param.
It would be great to have this exposed in the UI.