Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Cutting Cloth
#1
Hi.

I was searching through forums looking for cutting cloth on collision like Knife. I did came across a thread where you mentioned these 3 steps:


Code:
[1] Detect contacts between the knife and the cloth particles.

[2] Get the contact particle index, and find out which constraint (s) involve that particle by iterating over all constraint batches.

[3] Call cloth.Tear() passing a StructuralConstraint struct, that references the constraint and its batch.

I got the contact particle index, but I am stuck and confused by iterating over all constraint batches by involving that. How exactly to do that?
I saw the ApplyTearing() function, but I think it only iterates through Distance constraint batch. Also what exactly is constraint batch?

Please help. Thank you.
Reply
#2
(23-12-2020, 07:38 PM)Spectra_7 Wrote: I got the contact particle index, but I am stuck and confused by iterating over all constraint batches by involving that. How exactly to do that?
I saw the ApplyTearing() function, but I think it only iterates through Distance constraint batch. Also what exactly is constraint batch?

Please help. Thank you.

Hi there,

This page describes batches and constraint access in detail:
http://obi.virtualmethodstudio.com/tutor...aints.html

Let me know if you need further help. cheers!
Reply