Obi Official Forum
Rope/Rod gets stuck inside mesh 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 Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Rope/Rod gets stuck inside mesh collider (/thread-1548.html)



Rope/Rod gets stuck inside mesh collider - Wattosan - 11-12-2019

Hi,

The problem is that the Obi Rope or Rod gets stuck in a concave mesh collider. In my case it is a water bath and the player is supposed to throw the cable into the water. However, quite often the rope gets stuck inside the mesh and usually after some fiddling and pulling it gets released again.

[Image: AwNi3Iq.png]

Any ideas on how to make it more reliable so that it would not get stuck?

Thank you!


RE: Rope/Rod gets stuck inside mesh collider - josemendez - 11-12-2019

(11-12-2019, 08:20 AM)Wattosan Wrote: Hi,

The problem is that the Obi Rope or Rod gets stuck in a concave mesh collider. In my case it is a water bath and the player is supposed to throw the cable into the water. However, quite often the rope gets stuck inside the mesh and usually after some fiddling and pulling it gets released again.

[Image: AwNi3Iq.png]

Any ideas on how to make it more reliable so that it would not get stuck?

Thank you!

Don't use MeshColliders, specially not concave ones as they're "hollow" (once an object gets inside of it, it does not get automatically projected outside).

Use distance fields instead. They're much cheaper and way more robust:
http://obi.virtualmethodstudio.com/tutorials/distancefields.html


RE: Rope/Rod gets stuck inside mesh collider - Wattosan - 11-12-2019

(11-12-2019, 10:41 AM)josemendez Wrote: Don't use MeshColliders, specially not concave ones as they're "hollow" (once an object gets inside of it, it does not get automatically projected outside).

Use distance fields instead. They're much cheaper and way more robust:
http://obi.virtualmethodstudio.com/tutorials/distancefields.html

Thank you! It indeed is more reliable now. 

One question, does the reference of Source Collider in the inspector of Obi Collider to the Mesh Collider have to remain, even after ticking Use Distance Field and giving the correct reference? I see that it automatically sets the reference if I set it to null. I understand that the distance field works because it is more reliable but does having the reference to the mesh collider reduce performance?

[Image: 6V8Biaa.png]


RE: Rope/Rod gets stuck inside mesh collider - josemendez - 11-12-2019

(11-12-2019, 11:22 AM)Wattosan Wrote: Thank you! It indeed is more reliable now. 

One question, does the reference of Source Collider in the inspector of Obi Collider to the Mesh Collider have to remain, even after ticking Use Distance Field and giving the correct reference? I see that it automatically sets the reference if I set it to null. I understand that the distance field works because it is more reliable but does having the reference to the mesh collider reduce performance?

[Image: 6V8Biaa.png]

Hi!

Having the reference to the mesh collider does not reduce performance. The distance field acts as an "override", but all ObiColliders must have a reference to a regular collider.