Obi Official Forum

Full Version: Is it possible to make the cloth taut in real time?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to make the cloth taut in real time? For a camping simulation to set up a tent, I'd like to "pin" the cloth down in the corners and make it taut.
(28-08-2018, 10:52 PM)jb88886 Wrote: [ -> ]Is it possible to make the cloth taut in real time? For a camping simulation to set up a tent, I'd like to "pin" the cloth down in the corners and make it taut.

You can scale down the distance constraints by setting the stretching scale to something < 1:
http://obi.virtualmethodstudio.com/tutor...aints.html

This will make it "shrink", which will tense it up if its edges have been pinned down.
(29-08-2018, 08:43 AM)josemendez Wrote: [ -> ]You can scale down the distance constraints by setting the stretching scale to something < 1:
http://obi.virtualmethodstudio.com/tutor...aints.html

This will make it "shrink", which will tense it up if its edges have been pinned down.

Great, thank you!

Another question, do you know how I can get the particle index from collision to change it to fixed from unfixed upon collision in the script? I read that you can set the particle position, but I didn't see if there was a method to get the index.
(29-08-2018, 04:04 PM)jb88886 Wrote: [ -> ]Great, thank you!

Another question, do you know how I can get the particle index from collision to change it to fixed from unfixed upon collision in the script? I read that you can set the particle position, but I didn't see if there was a method to get the index.

just use
Code:
int index = contact.particle;
See:

http://obi.virtualmethodstudio.com/tutor...sions.html