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 ThatAnalog

How would you implement this? How would you determine whether the player is against a wall or not?

1 decade ago by lazer

Is the wall an entity or is it part of the collision map? Looking at the page on collision detection might help: http://impactjs.com/documentation/collision

Then you can check if the player is against the wall and trigger other rules accordingly.

1 decade ago by quidmonkey

handleMovementTrace: function( res ){
    this.parent( res );
    if( res.tile.x === wall_tile_# ){
        //wall colliding code here
    }
}
Page 1 of 1
« first « previous next › last »