Page 1 of 1

Rolling back solved constraints

Posted: Thu Apr 26, 2012 8:52 pm
by PaulTerry
Is it possible, without modifications, to roll back a particular step of solved constraints? I.e. in the internalSingleStepSimulation method, discard the results after the solveConstraints() call and then solve it again? I am interested in this to perform more realistic breaks after collisions, specially against objects which are glued to very heavy structures.

Re: Rolling back solved constraints

Posted: Sat Apr 28, 2012 2:53 pm
by CookieMonster
I would use a compound shape for each heavy body so that the small details will always be in the right place.
You can also use class inheritance if you want to modify the engine while still being able to upgrade to a new version of Bullet.

Re: Rolling back solved constraints

Posted: Sat Apr 28, 2012 7:05 pm
by PaulTerry
Small details? Actually, I want to recalculate the constraints after I changed the composition of objects. I was looking for an alternative without the need to modify. If I have to modify it though I will add a commit/rollback feature there, which is what I am looking for.