Cloth colision with mesh colliders - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html) +--- Thread: Cloth colision with mesh colliders (/thread-77.html) |
Cloth colision with mesh colliders - felipeyounner - 23-08-2017 Hi, I need create realistic clothes in Unity, but im having some dificulties with obi colision with mesh colliders, the cloth is ignoring my colliders and entering in my model. I tried to follow some tutorials that i found about obi cloth and it doesnt make any sense why it is ignoring my colliders. Is there any component besides the obi colider group component that i need to make the collisions work? And how do you guys make the first example on your asset store video? The one that the cloth slides trought the model? A demo scene would be awesome. Thanks, and sorry for my bad english RE: Cloth colision with mesh colliders - josemendez - 23-08-2017 (23-08-2017, 06:25 PM)felipeyounner Wrote: Hi, Hi there, Felipe! welcome to the forums Make sure that: 1.- Your MeshCollider and your cloth are in separate layers. (see http://obi.virtualmethodstudio.com/tutorials/collisions.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. RE: Cloth colision with mesh colliders - felipeyounner - 23-08-2017 (23-08-2017, 06:38 PM)josemendez Wrote: Hi there, Felipe! welcome to the forums Hi, thanks 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/tutorials/skinconstraints.html ) but i can't figure out how. There is any other tips that you could give me? Thank you very much |