Obi Official Forum
Mesh stuck into wall - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: Mesh stuck into wall (/thread-1053.html)



Mesh stuck into wall - aphixe - 08-04-2019

Any thing to combat meshes getting stuck into walls?


RE: Mesh stuck into wall - aphixe - 09-04-2019

(08-04-2019, 05:47 AM)aphixe Wrote: Any thing to combat meshes getting stuck into walls?

mind you the meshes get stuck in walls and floors, sometimes when i run into them.

[attachment=324]
[attachment=325]
[attachment=326]
[attachment=327]


RE: Mesh stuck into wall - josemendez - 09-04-2019

(09-04-2019, 01:35 AM)aphixe Wrote: mind you the meshes get stuck in walls and floors, sometimes when i run into them.

MeshColliders are the only colliders not "solid", meaning if a particle ends up inside them during a given frame (which is possible even with the default CCD, due to positional correction) it will get stuck inside of it. This issue is called tunneling and happens in all game engines, given small and/or fast enough objects (particles, in the case of Obi), as it's a fundamental consequence of how time is represented in computers (in a discrete way).

You could use distance fields instead, which are solid, and way more performant than MeshColliders:
http://obi.virtualmethodstudio.com/tutorials/distancefields.html

You can also add a ObiParticleRenderer to your soft body, to visually debug what's happening (particles too small, gaps between particles, etc) and fix it:
http://obi.virtualmethodstudio.com/tutorials/particlerendering.html