Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  how can i creat a chain at run time
#9
Add this:

Quote:pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
batch = pinConstraints.batches[0];
batch.stiffnesses[0 * 2 + 1] = 10000;
batch.stiffnesses[1 * 2 + 1] = 10000;

After the "rope.ropeBlueprint = blueprint;" line.

The issue is that you're setting the stiffnesses in the blueprint batch, not the actor (runtime) batch.

cheers,
Reply


Messages In This Thread
RE: how can i creat a chain at run time - by josemendez - 04-08-2020, 09:43 AM