Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Replace pin constraint in runtime?
#3
(10-04-2018, 10:13 AM)josemendez Wrote: Hi there,

You can remove the old constraint, then add a new one that uses the new object just like you are doing. However you must pass the index of a constraint to RemoveConstraint(), not the index of a particle. (i.e. If you only have one pin constraint added, you should pass "0" as the index).

https://gyazo.com/e25e93e5929bdff59c0c5ba40936fc40

Did this now. The pin constraint does get removed but the rope is still attached to the first object that had the pin constraint from the beginning and no new pin constraints were added to the last particle. I was not sure what to pass in the rope.addsolver(?) so i tried both with null and the pinconstraint. Where am i doing it wrong haha?
Reply


Messages In This Thread
Replace pin constraint in runtime? - by Karlanton - 09-04-2018, 12:53 PM
RE: Replace pin constraint in runtime? - by Karlanton - 10-04-2018, 04:31 PM