phonegap box2d 打包到android手机,运行不正常(staticBodyDef abnormal)?

我把cocos2d html5 (box2d)开发的游戏,phonegap打包到android手机上运行,其中的地面刚体(staticBodyDef),会自动抖动(在pc浏览器中运行很正常).

如何解决此问题,还请高人指点!

Cocos2d html5 (box2d) developped a game,
phonegap to android phone and running ,but the ground body (staticBodyDef), automatically jitter (pc browser running normal).

How to solve this problem!

whats your frame rate on android devices?

If your box2d updates based on dt, then the world will become very unstable and jitters especially if your frame rate is low

you need to “fix” the dt like this

world.step(0.01666) instead of world.step(dt)

this will make your physics more stable, but then your physics world speed will be dependent on the framerate

We plan to improve engine schedule in next version in March.

That would be great!

The Chipmunks wrapped in android phone(with phonegap),the ground body(staticBody) run normally,

but the screen of phone will be hang when dynamicBody Collided with each other.