Mass don't affect falling down velocity

Discuss any Chipmunk bugs here.

Mass don't affect falling down velocity

Postby [ghost] » Wed Jul 13, 2011 2:30 pm

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 :
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);
Posts: 1
Joined: Wed Jul 13, 2011 2:20 pm

Re: Mass don't affect falling down velocity

Postby slembcke » Wed Jul 13, 2011 4:43 pm

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! ->
User avatar
Site Admin
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Mass don't affect falling down velocity

Postby AndyKorth » Wed Jul 13, 2011 4:55 pm

A famous experiment recreated on Apollo 15: ... 2259784994
User avatar
Site Admin
Posts: 36
Joined: Wed Aug 15, 2007 3:56 pm

Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests