You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pertains to this function in planck.js: Solver.prototype.solveWorldTOI
I've spent that past few days hunting down a rare desync bug with my multiplayer game. I isolated the problem to my static terrain bodies being very slightly altered by dynamic bodies. By very slightly, I mean m_sweep being altered by very small float rounding errors. But eventually they compound and cause desync issues.
These small rounding errors are caused because Body.prototype.advance or Sweep.prototype.advance getting called on Static objects in Solver.prototype.solveWorldTOI. I don't believe there is a reason for sweep advance to get called on Static objects? I might be wrong. I'm not* super familiar with how this engines works.
I'm not sure I could write a good demo to show off the problem.. but I figured I would altease raise the issue. I've been able to solve the issue by putting !isStatic() checks before each sweep.advance call in Solver.prototype.solveWorldTOI.
(I've never done a bug fix pr, trying to figure it out)
The text was updated successfully, but these errors were encountered:
This pertains to this function in planck.js:
Solver.prototype.solveWorldTOI
I've spent that past few days hunting down a rare desync bug with my multiplayer game. I isolated the problem to my static terrain bodies being very slightly altered by dynamic bodies. By very slightly, I mean m_sweep being altered by very small float rounding errors. But eventually they compound and cause desync issues.
These small rounding errors are caused because
Body.prototype.advance
orSweep.prototype.advance
getting called on Static objects inSolver.prototype.solveWorldTOI
. I don't believe there is a reason for sweep advance to get called on Static objects? I might be wrong. I'm not* super familiar with how this engines works.I'm not sure I could write a good demo to show off the problem.. but I figured I would altease raise the issue. I've been able to solve the issue by putting
!isStatic()
checks before each sweep.advance call inSolver.prototype.solveWorldTOI
.(I've never done a bug fix pr, trying to figure it out)
The text was updated successfully, but these errors were encountered: