Obi Official Forum

Full Version: Make cloth grow if inside collider?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Any way to make a cloth grow if it is completely inside a collider? For example, a XS tshirt inside of a very big guy. Any way to make it stretch to fit the guy?

Thanks.
(07-12-2018, 04:16 PM)aelbannan Wrote: [ -> ]Hi,

Any way to make a cloth grow if it is completely inside a collider? For example, a XS tshirt inside of a very big guy. Any way to make it stretch to fit the guy?

Thanks.

Not in a very controllable or meaningful way for your purpose, but can be done to some extent.

You can stretch or enlarge cloth by altering the distance constraints' stretching scale property:
http://obi.virtualmethodstudio.com/tutor...aints.html

You can also tell if particles are close or inside a collider by using collision callbacks:
http://obi.virtualmethodstudio.com/tutor...sions.html
(07-12-2018, 05:04 PM)josemendez Wrote: [ -> ]Not in a very controllable or meaningful way for your purpose, but can be done to some extent.

You can stretch or enlarge cloth by altering the distance constraints' stretching scale property:
http://obi.virtualmethodstudio.com/tutor...aints.html

You can also tell if particles are close or inside a collider by using collision callbacks:
http://obi.virtualmethodstudio.com/tutor...sions.html

Thank you!

Is there any way to programatically move a particle (give it a new position)? I'm not having any luck finding this in the API.
(08-12-2018, 04:36 AM)aelbannan Wrote: [ -> ]Thank you!

Is there any way to programatically move a particle (give it a new position)? I'm not having any luck finding this in the API.

Yep. Use Oni.SetParticlePositions(). See:
http://obi.virtualmethodstudio.com/tutor...icles.html
(08-12-2018, 02:15 PM)josemendez Wrote: [ -> ]Yep. Use Oni.SetParticlePositions(). See:
http://obi.virtualmethodstudio.com/tutor...icles.html

Thank you!