Closed jcyuan closed 5 years ago
I found that this is caused by the loop times (subStep.positionIterations
) exceeded from the limited 20 times in the SolveTOI
method of the b2Island
class which means contactSolver.SolveTOIPositionConstraints
failed the test, what caused this?
forget about this, sorry, this is caused by the platform, not the lib, so close this.
@jcyuan How to fix (avoid) this issue in your environment that the special one ?
it was my mistake, this version of box2d runs just well on wechat mini game.
this does not exist on PC, our environment is a special one, if you use Chian shap to make a wall, and when a dynamic box hits it, the box will 'bounce' back once.
in my code: gravity: 9.8 box's linear velocity on horizontal is set to 4 road: whatever line shape or chain shap others are all default value
here is the test video: https://jc-space.com/test/v.mp4
as you can see, when the box hits the wall, it will be 'dragged' back (from x: 7.6 to 6.8) , and then move forward again (because I set linearvelocity in a loop), then back again, then loop again...
because this does not exist on PC and I'm not familiar with the principle of physics engine, so I have no idea at all what can cause this problem, float precision?? please help to analyze, thanks so much! this is really critical for us!
@flyover @finscn