Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic Pin Constraints?
#2
(14-08-2017, 02:04 AM)gxiv. Wrote: Hi!

What is the method for dynamically adding pin constraints to a rope??

I've tried creating an ObiPinConstraintBatch object, using the AddConstraint function, and then using AddBatch to add the pinconstraintbatch to the ropes pin constraints. I reference the pin constraints of my rope with:
pinConstraints = swingRope.GetComponent<ObiPinConstraints> ();

Is this the proper way of doing this? Because what I've written appears to have no affect! I would appreciate any help!!

gxiv

Hi,

Check out the manual page on how to add/remove constraints:
http://obi.virtualmethodstudio.com/tutor...aints.html

You should not create a new batch, as there's already an empty one by default on all actors. You just:
- Remove the constraints from the solver.
- Get a reference to the first pin constraint batch.
- Add/remove constraints from the batch.
- Add back the constraints.
Reply


Messages In This Thread
Dynamic Pin Constraints? - by gxiv. - 14-08-2017, 02:04 AM
RE: Dynamic Pin Constraints? - by josemendez - 15-08-2017, 11:18 AM
RE: Dynamic Pin Constraints? - by gxiv. - 17-08-2017, 12:57 AM
RE: Dynamic Pin Constraints? - by niZmo - 31-08-2017, 04:15 AM
RE: Dynamic Pin Constraints? - by niZmo - 31-08-2017, 02:29 PM