Change total mass for non-elastic colliding objects?

Official forum for the Chipmunk2D Physics Library.
Post Reply
winkle
Posts: 6
Joined: Tue Dec 22, 2015 11:21 am
Contact:

Change total mass for non-elastic colliding objects?

Post by winkle »

We have a code that is swimming cells in a viscous fluid, where we are in the "non-inertial regime" such that all velocity is proportional to force (I use a custom cpBodyUpdateVelocity() function, which kills previous velocity).

When we have two objects collide non-elastically, it is clear that the sum of masses is used to determine the resulting velocity of both objects together (conservation of momentum). However, we would like to have all collided objects use a unit mass (and not add them up from each body in the collision).

Is there a simple way to reset the "collision mass sum" of objects that are determined to all move together in the impulse solver? I am hoping there is a final "divide by m_total" for each body when the velocity of colliding objects is calculated, but I am unsure if it is that simple on looking at the impulse functions.

Any easy way to do this?

Thanks...we want to do this to remain "non-inertial" for growing cells when they hit other objects (of the same mass), where the growth speed should remain the same, even if it runs into dead weight in the environment and tacks on extra mass at one of its end.

Cheers,
--winkle
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests