Obi Official Forum
Falling clothes - 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: Falling clothes (/thread-2618.html)



Falling clothes - Sloon - 07-12-2020

Good afternoon. There was such a question:

How to implement that the clothes could fall (the jacket fell from the chair, or as in the movies, the person disappeared and the clothes fell at the place of disappearance)?


RE: Falling clothes - josemendez - 07-12-2020

(07-12-2020, 12:28 PM)Sloon Wrote: Good afternoon. There was such a question:

How to implement that the clothes could fall (the jacket fell from the chair, or as in the movies, the person disappeared and the clothes fell at the place of disappearance)?

Hi there,

I'm not sure I understand your question. There's nothing you need to do for cloth to fall, gravity will take care of this automatically.

(07-12-2020, 12:28 PM)Sloon Wrote: the person disappeared and the clothes fell at the place of disappearance)?

If the person here is represented by a set of colliders that the cloth is sitting on top of, disabling the colliders would cause the cloth to fall.


RE: Falling clothes - Sloon - 07-12-2020

(07-12-2020, 12:58 PM)josemendez Wrote: Hi there,

I'm not sure I understand your question. There's nothing you need to do for cloth to fall, gravity will take care of this automatically.


If the person here is represented by a set of colliders that the cloth is sitting on top of, disabling the colliders would cause the cloth to fall.
The cloth does not lie on the person. It is necessary that clothing (shorts, pants. jacket) fell from a person if their body disappeared. that is, clothing that has a SkinnedMeshRenderer. Like in the movie "War of the worlds", when tripods destroyed people, and after the destruction of clothing (jacket, pants, etc.) flew in different directions..


RE: Falling clothes - arkanis - 07-12-2020

(07-12-2020, 05:14 PM)Sloon Wrote: The cloth does not lie on the person. It is necessary that clothing (shorts, pants. jacket) fell from a person if their body disappeared. that is, clothing that has a SkinnedMeshRenderer.  Like in the movie "War of the worlds", when tripods destroyed people, and after the destruction of clothing (jacket, pants, etc.) flew in different directions..

I think the best way to approach this would be to create new cloth objects when the character is disappearing in the positions needed.


RE: Falling clothes - Sloon - 08-12-2020

If you just take a piece of cloth (without a mesh (pants, jacket)), you will see that it is just a rag. It is necessary either to make a terrible movement of some kind, or somehow tear it to shreds so that it is indistinguishable.


RE: Falling clothes - josemendez - 08-12-2020

(08-12-2020, 06:43 AM)Sloon Wrote: If you just take a piece of cloth (without a mesh (pants, jacket)), you will see that it is just a rag. It is necessary either to make a terrible movement of some kind, or somehow tear it to shreds so that it is indistinguishable.

Hi there,

If what you're looking for is for the clothes to "fly off" after the body disappears, just adding a random force to it should work. You can use cloth.AddForce() for this.

I assume you will be using skinned cloth (since you're doing character clothing), so in that case you can't use ObiTearableCloth to tear it to shreds. You must use ObiSkinnedCloth. See: http://obi.virtualmethodstudio.com/tutorials/clothsetup.html

For the skinned cloth to fall after the character body disappears, you must disable skin constraints or give them a large compliance value. See http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html for details.


RE: Falling clothes - Sloon - 08-12-2020

Okay, thanks, I'll try.