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:
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!
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!