kripken / box2d.js

Port of Box2D to JavaScript using Emscripten

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PreSolve and PostSolve never called?

ruskul opened this issue · 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);