Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Joncom

Maybe I was doing something wrong, but I couldn't get the debug feature disabling "Checks and Collisions" to work out of the box. It simply doesn't do anything.

However, using code describing how to create the feature in ones own debug panel seems to work just fine. Here's what I used to disable collisions for testing.

// disable collisions
ig.CollisionMap.inject({
    trace: function( x, y, vx, vy, objectWidth, objectHeight ) {
        // Return a dummy trace result, indicating that the object
        // did not collide
        return {
            collision: {x: false, y: false},
            pos: {x: x+vx, y: y+vy},
            tile: {x: 0, y: 0}
        };
    }
});

I'm just not sure why there exists a check box for this already, if if has to be done manually.

1 decade ago by dominic

I guess the labeling for the checkbox is missleading. It only disables "dynamic" collisions - i.e. entity vs. entity. The collision detection of entities vs. the CollisionMap is untouched.

Instead of injecting the above code, you could also just reset the Game's CollisionMap to the empty dummy:
ig.game.collisionMap = ig.CollisionMap.staticNoCollision;

1 decade ago by Joncom

Thanks for clarifying, and for the simple "no-clip" solution.
Page 1 of 1
« first « previous next › last »