Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Adding pin constraints to a rope at runtime
#6
(18-03-2018, 05:51 PM)josemendez Wrote: Exact same problem as OP.

Change this:
Code:
ObiPinConstraintBatch batch = pins.GetFirstBatch()[0] as ObiPinConstraintBatch;

to this:
Code:
ObiPinConstraintBatch batch = pins.GetFirstBatch() as ObiPinConstraintBatch;
Sorry I had already done that, just reverted it to remind myself of the error forgot to re-set it before copying the code.

Sorry for the confusion, the error "NullReferenceException: Object reference not set to an instance of an object" occurs with the code set as in your suggestion.
Reply


Messages In This Thread
RE: Adding pin constraints to a rope at runtime - by Gieve - 18-03-2018, 05:56 PM