Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Make cloth grow if inside collider?
#1
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.
Reply
#2
(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
Reply
#3
(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.
Reply
#4
(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
Reply
#5
(08-12-2018, 02:15 PM)josemendez Wrote: Yep. Use Oni.SetParticlePositions(). See:
http://obi.virtualmethodstudio.com/tutor...icles.html

Thank you!
Reply