montane Posted May 18, 2016 Share Posted May 18, 2016 In the example here http://phaser.io/examples/v2/games/invaders I would like to stop the player from being able to go out of the visible area. At the moment if you keep scrolling right or left the player goes out of view. Thanks in advance. Link to comment Share on other sites More sharing options...
spinnerbox Posted May 18, 2016 Share Posted May 18, 2016 I would check Arcade physics instead: http://phaser.io/examples/v2/category/arcade-physics I think, sprite.body.collideWorldBounds = true; http://phaser.io/examples/v2/arcade-physics/one-way-collision is what your are searching for. montane 1 Link to comment Share on other sites More sharing options...
Recommended Posts