Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Apply force to a certain element of the rope
#4
(25-08-2020, 07:22 PM)flaurens Wrote: Ok I thank you that now I understand it a little bit better.
But as I understand Tear is applied to an element right? How can I tear a rope starting from a collision? As I know from a collision callback I can get the particle...

Hi,

Yes, tearing is applied to elements. The logic behind tearing is that when an element detects that a large force would need to be applied to the particles at its ends to keep them together, one of the two particles is selected and duplicated to create a "gap" in the rope.

Since collision detection you get the particle index, you simply need to look in the elements array for the first element that references that particle, and tear it. A simple for loop over all elements is the easiest way to do this.
Reply


Messages In This Thread
RE: Apply force to a certain element of the rope - by josemendez - 26-08-2020, 11:27 AM