cyclone-physics icon indicating copy to clipboard operation
cyclone-physics copied to clipboard

wrong calculation of total inverse mass

Open cosfer65 opened this issue 4 years ago • 1 comments

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.

cosfer65 avatar Oct 28 '20 10:10 cosfer65

This seems to be related to issue #13

LucasCampos avatar Oct 28 '20 13:10 LucasCampos