17-03-2022, 06:39 PM
(This post was last modified: 17-03-2022, 06:42 PM by josemendez.)
(17-03-2022, 04:13 PM)locque Wrote: I'm afraid that does not work, that's the first thing I thought about too.
The layer is per gameobject, not per collider. And I would need to have one collider on the layer that interacts with the world and another one on a layer that doesn't on the same gameobject that the unity rigidbody is on. I can't create a child object for the obi collider either since the obi rigidbody needs to be on the same gameobject as the unity rigidbody, otherwise it will just create an additional unity rigidbody for itself on the child object.
Can’t you just have two gameobjects, each with their respective collider component and the rigidbody as their parent? This is functionally identical to having two colliders and a rigidbody on the same object. Colliders always work with the first rigidbody they find up their hierarchy.
Obi’s components are just wrappers over Unity’s own components, and work the exact same way: if you add a ObiCollider component to a collider, a ObiRigidbody will automatically be added to the first rigidbody up its hierarchy.
Tbh i’ve never seen a use case limited by the fact that layers are per-object and not per-component, that’s why I ask.