kripken / box2d.js

Port of Box2D to JavaScript using Emscripten
1.32k stars 198 forks source link

PreSolve and PostSolve never called? #71

Open ruskul opened 9 years ago

ruskul commented 9 years ago

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);