Obi Official Forum
Help Obi Collider with Custom Collider - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Help Obi Collider with Custom Collider (/thread-2745.html)



Obi Collider with Custom Collider - Torchbiz - 11-02-2021

Hello all,

I am aiming to make a potion-mixing simulator and I am attempting to create a bottle to put liquid inside of. I am using Unity 3D and I have downloaded a Compound Collider script that allows concavity, and creates a compound collider by adding multiple mesh colliders as children of the desired object. I currently tried to add an Obi Collider script onto every child object that is made of the colliders. In theory this should work, but the liquid is still falling through. 

Is there a way I can have the Obi Collider script communicate with this compound collider? If this isn't simple is there a possible way to complete this through scripting? Any and all help appreciated! I have attached photos below.


RE: Obi Collider with Custom Collider - josemendez - 11-02-2021

(11-02-2021, 02:01 AM)Torchbiz Wrote: Hello all,

I am aiming to make a potion-mixing simulator and I am attempting to create a bottle to put liquid inside of. I am using Unity 3D and I have downloaded a Compound Collider script that allows concavity, and creates a compound collider by adding multiple mesh colliders as children of the desired object. I currently tried to add an Obi Collider script onto every child object that is made of the colliders. In theory this should work, but the liquid is still falling through. 

Is there a way I can have the Obi Collider script communicate with this compound collider? If this isn't simple is there a possible way to complete this through scripting? Any and all help appreciated! I have attached photos below.

Obi already supports concave mesh colliders out of the box. You can use either a regular MeshCollider (Obi will consider it concave, even if Unity doesn't), or better yet, use distance fields:
http://obi.virtualmethodstudio.com/tutorials/distancefields.html

They're much cheaper than mesh colliders, and considerably more robust.