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

PreCallback.swapped is wrong #82

Open
bartvanheukelom opened this issue Mar 5, 2014 · 1 comment
Open

PreCallback.swapped is wrong #82

bartvanheukelom opened this issue Mar 5, 2014 · 1 comment

Comments

@bartvanheukelom
Copy link

    space.listeners.add(new PreListener(
        InteractionType.COLLISION,
        Jumper.CBTYPE,
        JumpSurface.CBTYPE,
        function(cb:PreCallback):PreFlag {
            var a = cb.arbiter.collisionArbiter;
            if (cb.swapped && cb.int1 == a.shape1.body) throw "swapped error";
            ...
        }
    ));

If I understand correctly, the "swapped error" should never be thrown, but it is.

I haven't reproduced it in a small sample yet, but in the main project it sometimes occurs on a collision between a Dynamic Jumper and Kinetic JumpSurface.

It doesn't happen when the JumpSurface is not moving (but then swapped is always false, a side effect of the order in which things are processed?)

@alamboley
Copy link

Similar to #102.

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

2 participants