Solution to incorrect impulses calculations with elasticity
Posted: Sun May 23, 2010 4:50 am
To slembecke, I tried sending this as a PM but after a couple days, is only in the outbox rather than sent messages, implying to me that you won't have received it at all
http://code.google.com/p/nape/
I've based a good part of my engine on your own, and i've come across what would seem to be a good solution to the problem of incorrect impulses being calculated when elastic iterations are used.
My solution is to store the cached impulse values jnAcc and jtAcc (pjnAcc and pjtAcc in nape) when warm-starting the contacts between elastic and inelastic iterations, and then when evaluating impulses afterwards for whatever reason (sound effects, crushing impulses etc), add the current cached values, with the mid-step cached values to get a total value which as far as I can tell is exactly what it should be, and what would be expected.
http://code.google.com/p/nape/
I've based a good part of my engine on your own, and i've come across what would seem to be a good solution to the problem of incorrect impulses being calculated when elastic iterations are used.
My solution is to store the cached impulse values jnAcc and jtAcc (pjnAcc and pjtAcc in nape) when warm-starting the contacts between elastic and inelastic iterations, and then when evaluating impulses afterwards for whatever reason (sound effects, crushing impulses etc), add the current cached values, with the mid-step cached values to get a total value which as far as I can tell is exactly what it should be, and what would be expected.