englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Game world boundaries not obeyed

RorschachRev opened this issue · comments

Without a tileset for collisions, the only collisions appear to be North and West boundaries. The p2physics enabled sprites are not limited by the game.world.setBounds(0, 0, 1600, 1200);

Calls that are supposed to add this feature also fail:
game.physics.p2.setBoundsToWorld(true, true, true, true, false); //fails

Using phaser-tiled current and Phaser 2.2.2 I haven't been able to come up with a hack that forces the sprite to stay in the world. I've even attempted a keyboard input hack, but also without success:
if (this.cursors.down.isDown)
if (this.player.y < game.world._height-17 )
this.player.body.moveDown(150);.

Without the phaser-tiled system for map loading, the game.world boundaries and walls work normally.

I think this was caused by #22, going to close this as a duplicate of that issue.