Gravity responding too 'slowly'

Has anyone else noticed that Box2D's gravity seems slow for some reason?

This is obvious in the TestBed examples: Bridge, Collision Filtering, Compound Shapes, ...

Everything seems to run in slow motion against gravity. I've tried altering the params I know: gravity, mass, impulse, force, ... but they all result in this slow motion (floating) effect.

Any recommendations for implementing a more realistic and responsive gravitational effect in Box2D?
The larger the objects are, the less gravity seems to affect them...

I haven't noticed anything inherent to box2d, but if you have something like a 4m tall person by accident, and regular gravity (-10), it will look "floaty". If that isn't the issue, I can't really help.
Simply turning up gravity will get the speed you want - there is no question of responsiveness for gravity.

If you've already tuned your game, but now want it to generally feel more responsive/dynamic/other adjective, you can use the trick of just increasing the time factor (i.e. put a large figure in the timestep for each call to Step).
Thanks for the advice. Turns out that my value for gravity was too low (-1.0) and my mass density too high (25.0). The better approach was starting with a high gravity and lower mass.

I then increased my mass until things looked and felt right.
Toeofdoom wrote:
The larger the objects are, the less gravity seems to affect them...

I haven't noticed anything inherent to box2d, but if you have something like a 4m tall person by accident, and regular gravity (-10), it will look "floaty". If that isn't the issue, I can't really help.


No!!!!

It doesn't affect them any less, it's just that they are so big, so you're drawing them "zoomed out" (small so that they fit the screen) and it's basically like you're watching the objects falling from really far away. It's like watching airplanes in the sky... they look like they're moving really slow, but trust me, they're not.

Just use realistic dimensions, and it'll look fine. Use -9.8 or -10 for gravity, and draw your dudes at about 1.8m. Density of water is 1.0 and humans are mostly water, so that should work fairly well for density. Either that, or calculate the area of your dude, and reverse engineer the density so that his mass makes sense.
darkzerox wrote:
Toeofdoom wrote:
The larger the objects are, the less gravity seems to affect them...

I haven't noticed anything inherent to box2d, but if you have something like a 4m tall person by accident, and regular gravity (-10), it will look "floaty". If that isn't the issue, I can't really help.


No!!!!

It doesn't affect them any less, it's just that they are so big, so you're drawing them "zoomed out" (small so that they fit the screen) and it's basically like you're watching the objects falling from really far away. It's like watching airplanes in the sky... they look like they're moving really slow, but trust me, they're not.

Just use realistic dimensions, and it'll look fine. Use -9.8 or -10 for gravity, and draw your dudes at about 1.8m. Density of water is 1.0 and humans are mostly water, so that should work fairly well for density. Either that, or calculate the area of your dude, and reverse engineer the density so that his mass makes sense.

Yes, that's why I said the less it "seems" to affect them, and they will "look" floaty. Density won't actually affect how fast they fall anyway, for that matter.

Original thread: https://box2d.org/forum/viewtopic.php?t=4118