box2d.js icon indicating copy to clipboard operation
box2d.js copied to clipboard

PreSolve and PostSolve never called?

Open ruskul opened this issue 10 years ago • 0 comments

Hey

I was trying to get PreSolve and PostSolve to work but it seems they are never called. BeginContact and EndContact are both fine. I checked the bindings and it doesn't appear to be a binding for them at all. Anywhere.

    var listener = new Box2D.JSContactListener();
listener.BeginContact = function (contactPtr) {
    var contact = Box2D.wrapPointer(contactPtr, Box2D.b2Contact);
    //can do whatever I want with contact
};
listener.EndContact = function (contactPtr) {
    var contact = Box2D.wrapPointer(contactPtr, Box2D.b2Contact);
};      

listener.PreSolve = function (contactPtr, oldManifoldPtr) {

    I Can write whatever I want here because its never called.
            (>.<) poop
}; 

    this.world.SetContactListener(listener);

ruskul avatar Feb 21 '15 00:02 ruskul