Help Manually tear the cloth - 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: Help Manually tear the cloth (/thread-2278.html) |
Manually tear the cloth - bluedrag0n - 31-05-2020 Hi, I need to manually tear the cloth based on the particle I selected. I have the particleindex of the selected particle and need to tear that particle from the particle above it, or remove the distance constraint. Is there a way to do it without using physics/force? I can get the cloth's distance constraints and traverse through the batches but I can't figure out how to find the correct constraint. Thanks RE: Manually tear the cloth - Andrew Graham - 09-06-2020 (31-05-2020, 03:27 PM)bluedrag0n Wrote: Hi, I would also be interested in this. I am trying to implement a knife that will instantly cut the cloth whenever it comes into contact with it. It there a way to do this with Obi Cloth? Thanks. RE: Manually tear the cloth - josemendez - 09-06-2020 (09-06-2020, 09:31 AM)Andrew Graham Wrote: I would also be interested in this. I am trying to implement a knife that will instantly cut the cloth whenever it comes into contact with it. It there a way to do this with Obi Cloth? Hi Andrew, Sure, there's three steps involved:
You can see an example of the last two steps in ObiTearableCloth's ApplyTearing method: It iterates over all constraint batches, finds the ones whose force exceeds a threshold (you would find the ones in contact with the knife instead), then calls Tear() for them. Here's an example of this made by a fellow user, found it in reddit recently: |