(17-06-2020, 01:46 PM)Elend Wrote: With MeshCollider the collision would be even worse.
The problem is that my object (banana) goes throw the cloth (plastic)
with box collider things are a bit better but this happens : cloth collides with a different box collider (it seems ) instead of the green box collider
its like Obi Collider is not detecting the Source Collider correctly for some reason...
Hi there,
ObiCollider will grab the first collider up its hierarchy by default, but you can manually set it too.
MeshColliders are paper-thin, by definition: they're just a collection of triangles, and have no concept of "volume" inside the object. This means that if a particle goes inside it (due to tunneling, too large a timestep, pushed by another collider, or any other reason) it won't be projected back outside.
Primitive colliders are solid however, and can project other objects inside them. That's why they're usually much more robust (and cheaper).
In Obi we have a custom collision structure, widely used in many other engines because it combines the strengths of primitive colliders and mesh colliders:
distance fields. They're a grid-like data structure that precomputes the distance to the surface of an object from within any point inside its bounding box. This way, checking for collision is extremely efficient (simply read a value back from an array) and robust, since objects inside of it can be projected outside just by checking the sign of the distance (negative = inside, positive = outside).
I really recommend using them for this use case. You can read more about them here:
http://obi.virtualmethodstudio.com/tutor...ields.html