Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Rope Jitter In Editor But Not In Build
#3
Tried the latest version of the project that I have, but its behavior in a standalone build is identical to the editor (tried them side by side). Can't reproduce any jittering.

Out of curiosity took a look at the code in your Hand.AddForce() method:

Code:
float mass = _arm.GetMass(out com);
bodyForce /= mass;
Solver.externalForces[SolverIndex] += bodyForce / Solver.invMasses[SolverIndex];

You divide the force by the mass of the entire rope, which gets you an acceleration (dependant on the rope resolution and mass of other particles in the rope). You then divide this acceleration by the inverse mass of the last particle (that is, multiply it by the mass of the last particle), which gives you a much smaller force that depends on rope resolution. Not sure what the intent is here.

Applying a force to the rope at a given particle should be as simple as Solver.externalForces[SolverIndex] += force. This force will be automatically propagated trough the rope.
Reply


Messages In This Thread
RE: Rope Jitter In Editor But Not In Build - by josemendez - 30-03-2022, 09:00 AM