Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Generate Tethers at Runtime
#2
(10-01-2020, 07:56 AM)Visitor245262 Wrote: Ive added pin constraints at runtime by using .GetFirstBatch() on ObiPinConstraints. But when I try to do a similar thing with tethers I cant get the reference for the ObiTetherConstraintBatch.

And will I have to use AddConstraint for each fixed particle to every other particle on the mesh?

Thanks.

There's always a batch for pin constraints, even if there's no actual pins present. This is the only constraint type where this happens.

For all other constraints, you have to create and populate your own constraint batches. Assuming we're talking about Obi 5.0, you will have to make sure no two constraints in each batch reference the same particle. This is because all constraints in each batch are processed in parallel.

Nevertheless, both in Obi 4 and Obi 5 there's the GenerateTethers() function, that automatically creates and populates all tether batches for you. May I ask why do you need to generate tethers manually?
Reply


Messages In This Thread
Generate Tethers at Runtime - by Visitor245262 - 10-01-2020, 07:56 AM
RE: Generate Tethers at Runtime - by josemendez - 10-01-2020, 08:03 AM
RE: Generate Tethers at Runtime - by josemendez - 10-01-2020, 11:07 AM