Mass don't affect falling down velocity

Discuss any Chipmunk bugs here.
Post Reply
[ghost]
Posts: 1
Joined: Wed Jul 13, 2011 2:20 pm
Contact:

Mass don't affect falling down velocity

Post 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);
}
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Mass don't affect falling down velocity

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
AndyKorth
Site Admin
Posts: 36
Joined: Wed Aug 15, 2007 3:56 pm

Re: Mass don't affect falling down velocity

Post by AndyKorth »

A famous experiment recreated on Apollo 15:

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

Who is online

Users browsing this forum: No registered users and 8 guests