Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by sviudes

I made a simple test: I created a box2d world, and added a circle shape (a ball), so when I press a key I execute setLinearVelocity(0, -(big_value)) for the ball.

In a fast device (game runs at 60 fps) the ball reaches middle screen, and in a slow device (22 fps) the ball reaches only about 1/4 of the screen. I don't understand why... ¿?

Edit: in the same device, Box2D behavior is different if using Webview or CocoonJS. So it seems that FPS makes Box2D behavior different...

Anybody can help me?

1 decade ago by sviudes

I finally found why. It's because there is a maximum movement limit of 2.0 units per time (Box2D.Common.b2Settings.b2_maxTranslation=2). I think my gravity is too high, I'll try to reduce it.
Page 1 of 1
« first « previous next › last »