inner simulation steps and callback

Post Reply
topcomer
Posts: 31
Joined: Thu Sep 21, 2006 1:53 pm
Location: sweden but italian

inner simulation steps and callback

Post by topcomer »

I managed to write a collision callback which gives me all the contact info I need, however I get a seamless stream of contacts coming from the inner simulation steps and I'm hence not able to understand when one of this substeps finishes and the other starts. Is there a way to know that without having to implement a new constraint solver by myself?

Thanks for the help,
Alessio
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: inner simulation steps and callback

Post by Erwin Coumans »

Can you derive your class from btDiscreteDynamicsWorld, and override the

Code: Select all

virtual void	internalSingleStepSimulation( btScalar timeStep);
and call the original implementation first, and then do your contact callback/processing.

A contact callback demo will be added for Bullet 2.65.

Hope this helps,
Erwin
Post Reply