Skip to content

collision callbacks don't work consistently #18

@dtramer

Description

@dtramer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions