cyclone-physics
cyclone-physics copied to clipboard
wrong calculation of total inverse mass
in function void ParticleContact::resolveInterpenetration(real duration) (pcontacts.cpp around line 100) you calculate total inverse mass like this // The movement of each object is based on their inverse mass, so // total that. real totalInverseMass = particle[0]->getInverseMass(); if (particle[1]) totalInverseMass += particle[1]->getInverseMass();
I think this is mathematically wrong since 1/mass1 + 1/mass2 is not the same as 1/(mass1+mass2) as I think you mean. Browsing through the code I saw the same calculation in a number of points.
This seems to be related to issue #13