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 mega

I'm new impactjs and I searched the threads but couldn't find a solution to this problem, so I apologize if this question has been addressed. I'm using the mover.js entity from the biolab entity pack and it works fine except when the player jumps on top of a platform he remains in the 'jump' position and appears jittery. Does anyone know how to correct this? thx.

1 decade ago by Joncom

/* player */
collideWith: function(other, axis) {
    if( other instanceof EntityPlatform && // entity is platform
        axis === 'y' && // vertical collision
        this.pos.y + this.size.y <= other.pos.y ) // above platform
    {
        console.log("You are standing on a platform. Now what?");
    }
}

1 decade ago by mega

Thx JonCom that points me in the right direction.
Page 1 of 1
« first « previous next › last »