Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cloth colision with mesh colliders
#3
(23-08-2017, 06:38 PM)josemendez Wrote: Hi there, Felipe! welcome to the forums Sonrisa

Make sure that:

1.- Your MeshCollider and your cloth are in separate layers. (see http://obi.virtualmethodstudio.com/tutor...sions.html). Also, if you move your cloth to a different layer after initializing it, make sure you hit the "Set particles to layer" button to move all of its particles to the same layer as the cloth object.
2.- Collision constraints are enabled in your solver.

Also, keep in mind the limitations of mesh colliders (not Obi-specific, these apply to all realtime physics engines):

- If you use the object's transform to move it around (either in the editor using translation/rotation/scale gizmos, or at runtime) this is equivalent to teleporting it from one frame to the next. This prevents continuous collision detection from working, as it needs object's velocities to prevent penetration. Translating an object does not give it any velocity, it just "teleports" it. Using rigidbodies is the correct way of doing this.

- MeshColliders aren't deformable. Many people try to apply them to a character (SkinnedMeshRenderer) hoping that this will enable them to put a shirt on their character and have it collide with the character's skin. This is just not possible (Unity doesn't update mesh collider geometry when deformed, as it would be prohibitively expensive) and even if it was, not a good idea anyway. To do character clothing, use skinned cloth meshes together with skin constraints. This is the standard way we do it in the industry.

Hi, thanks Sonrisa

I removed my colliders, and i was already using the skin constrain, the part about set particles to layer really helped, but my cloth is still going trough my character skin, is there any way to prevent that? The result i want to achieve is very similar to the low backstop and high radious here ( http://obi.virtualmethodstudio.com/tutor...aints.html ) but i can't figure out how. There is any other tips that you could give me? 

Thank you very much Gran sonrisa
Reply


Messages In This Thread
Cloth colision with mesh colliders - by felipeyounner - 23-08-2017, 06:25 PM
RE: Cloth colision with mesh colliders - by felipeyounner - 23-08-2017, 07:21 PM