Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collision callbacks don't work consistently #18

Open
dtramer opened this issue Jul 28, 2013 · 1 comment
Open

collision callbacks don't work consistently #18

dtramer opened this issue Jul 28, 2013 · 1 comment

Comments

@dtramer
Copy link

dtramer commented Jul 28, 2013

The problem happens much more if you use a higher step frequency (meaning the 3rd parameter to the away physics world step function is lower).

Some background:

The awayphysics collision callbacks are called from the awayphysics step function.

As suggested here: http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Callbacks_and_Triggers
the awayphysics step function iterates over all of the contact manifolds.

The problem is that awayphysics doesn’t follow this additional advice from that link:

“This should be done during a simulation tick (substep) callback, because contacts might be added and removed during several substeps of a single stepSimulation call.”

So, what is happening is that if the collision occurs during one of those in between sub-steps, the collision callback won’t be called.

I initially reported this here: http://away3d.com/forum/viewthread/2997/ and JohnBrookes posted there that he was able to reproduce the problem.

@dtramer
Copy link
Author

dtramer commented Jul 29, 2013

muzerly - your change fixed this. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant