24-05-2021, 08:39 AM
(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!