GRAVITY?

I am new to box2D.
I m using the flash version and have worked with APE engine before.
I have gone through the manual and can work with it but i am having a problem adjusting gravity.
I am using a scale of 30 and a gravity of 10 as in the testbed)
But then i get a good gravity effect only when i m using an fps of 120.
If i lower the fps my blocks and circles come down floating.
To make the gravity stronger, i tried increasing gravity value and scale.
is it ok to use a scale of 100? Also what problems can it cause?
Also i get my desired gravity effect when i set gravity to 1000. But then all objects on ground keep shaking a bit (thats probably because of repetitive collision). Hence they do not sleep even if the are resting on a surface.
Is there anything else i can try to make the gravity more Earth-like. Or am i missing something ?
Also if i m doing everything right, then why is gravity built into the engine this way?
what is your m_timeStep ?
make it 1/30
I have changed the timeStep to 1/30. It is giving better results now.
Also making gravity 30 makes things much better. Everything looks fine now.
good good 😁
Everything is working ok but one problem.
Sometimes when one square is resting on another, they keep vibrating continuously. Why does this happen?
Also it only happens sometimes not always?
I m stuck??? trying a lot of things , let me know if ne one had the same problem and /or solution?
Im not really sure.
MY only hunch would be to try and get all your values similar to those in the hello world example.
set your frame rate to like 30
10 iterations
and timestep to 1/30

make sure your gravity is 10
eg
var gravity:b2Vec2 = new b2Vec2(0.0, 10.0);

is the vibrating box a big one on a small one ?

or a very heavy one on a very light one ?

be careful not to make your physics so extreme.

if it only happens sometimes then maybe that's okay.
remember even in gta4(multi million dollar game) the physics screws up a bit but not body really cares or notices except maybe the guys who programmed the engine and nerds.

Focus on getting a good gameplay mechanic and good framerate rather than perfect physics.

unless this problem is seriously hindering your game . then maybe you need to keep looking for a better answer.
Quote:
Sometimes when one square is resting on another, they keep vibrating continuously. Why does this happen?
Also it only happens sometimes not always?
You could also try turning down the restitution of your shapes.
well, that solution is not working. So far i tried changing restitution, gravity, timeStep but none stop the vibration of resting elements? It still misses me why objects vibrate sometime?
post the fla 😁
lots of the objects in my tests bounce too when a bigger object is on a smaller one. I'm huge on quality, so my fps is set to 90, and my gravity to 15. 15 isn't that high, so i'm curious what's going on too

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