Obi Official Forum
tearable 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: tearable cloth (/thread-3103.html)



tearable cloth - Bubu101 - 23-09-2021

Hi there,

Is there a way to start to tear a cloth without the physics engine?
In the sample we throw a sphere with a collider, but is there a way to do this with raycasting?
Like, somehow detecting where the cursor is pointing and start to tear in a certain place of the cloth?

Thanks!


RE: tearable cloth - josemendez - 23-09-2021

(23-09-2021, 12:40 PM)Bubu101 Wrote: Hi there,

Is there a way to start to tear a cloth without the physics engine?
In the sample we throw a sphere with a collider, but is there a way to do this with raycasting?
Like, somehow detecting where the cursor is pointing and start to tear in a certain place of the cloth?

Thanks!

Yes, you can combine spatial queries with tearing. See:
http://obi.virtualmethodstudio.com/manual/6.2/scriptingqueries.html

Cloth has a Tear() method to which you can pass a structural element. See the API docs for details, let me know if you need help with it.

kind regards,