Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Save/Load Obi Rope state and rope network state synchronization
#5
(24-05-2021, 08:27 AM)josemendez Wrote: There's sample code for this in the link I just posted. To read:

Code:
for (int i = 0; i < actor.solverIndices.Length; ++i)
{
    int solverIndex = actor.solverIndices[i];
    var pos = actor.solver.positions[solverIndex];
    var vel =  actor.solver.velocities[solverIndex];
}

To write:

Code:
for (int i = 0; i < actor.solverIndices.Length; ++i)
{
    int solverIndex = actor.solverIndices[i];
    actor.solver.positions[solverIndex] = yourPos;
    actor.solver.velocities[solverIndex] = yourVel;
}

Thanks a lot!
Reply


Messages In This Thread
RE: Save/Load Obi Rope state and rope network state synchronization - by pmike - 24-05-2021, 08:39 AM