Page 1 of 1

Mass don't affect falling down velocity

Posted: Wed Jul 13, 2011 2:30 pm
by [ghost]
Hi, can't understand why the gravity isn't affected by the body mass in default velocity update method,is there any way to make falling down velocity to be different from one body to another depending on mass of the body?

If i'm right and this is not intended the cpBodyUpdateVelocity shoud be updated to :
void
cpBodyUpdateVelocity(cpBody *body, cpVect gravity, cpFloat damping, cpFloat dt)
{
body->v = cpvclamp(cpvadd(cpvmult(body->v, damping), cpvmult(cpvadd(cpvmult(gravity,body->m), cpvmult(body->f, body->m_inv)), dt)), body->v_limit);

cpFloat w_limit = body->w_limit;
body->w = cpfclamp(body->w*damping + body->t*body->i_inv*dt, -w_limit, w_limit);
}

Re: Mass don't affect falling down velocity

Posted: Wed Jul 13, 2011 4:43 pm
by slembcke
Acceleration due to gravity is the same for everything regardless of mass (ignoring air drag anyway). Galileo did a famous experiment to prove it a few hundred years back.

Re: Mass don't affect falling down velocity

Posted: Wed Jul 13, 2011 4:55 pm
by AndyKorth
A famous experiment recreated on Apollo 15:

http://video.google.com/videoplay?docid ... 2259784994