Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Apply force to a certain element of the rope
#1
Hi!

I'm interested on knowing how to apply a certain force to a certain element of the rope.
I let the player cut the rope by doing:

Code:
            rope.Tear(rope.elements[IndexToBreak]);
            rope.RebuildConstraintsFromElements();

What I want is to apply a certain amount of force to IndexToBreak in order to simulate that the "cut" has been produced. Right now when the rope is cut it falls normally.

I read from the documentation that I have to set the inverse mass of that element to zero and then apply the force that I want, but if I do that the element that I set its mass to zero gets freeze. What is the best approach in that case? Save the previous mass, set mass to zero, apply force and then set mass to the previous value?

Regards!
Reply


Messages In This Thread
Apply force to a certain element of the rope - by flaurens - 25-08-2020, 11:53 AM