chipe Posted October 11, 2015 Share Posted October 11, 2015 I am new to phaser so sorry if this seems like a newb question. I have searched for this with no luck. Maybe I just dont know what I am looking for yet. After creating the world map, I have a bigger map than the player can see. As the player reaches the edge of the map, the player can go outside of my set jpg map that is a width of 5000 pixels by 5000 pixels and can see black past the edge One: How can I keep the player inside the edge of the map and Two: how do I set the map so as the player navigates to the end of the maps edge the map stops showing what is past it This is just a mockup js fiddle but will give the idea. you can move with the arrows, but when you get to the set bounds of the map the player can go past and you see past the bounds http://jsfiddle.net/krr9ay5e/ Thanks for any help! Link to comment Share on other sites More sharing options...
Skeptron Posted October 12, 2015 Share Posted October 12, 2015 Did you check this example? It does exactly what you want (borders to the world and not showing what is out of the world) : http://phaser.io/examples/v2/camera/basic-follow Link to comment Share on other sites More sharing options...
Recommended Posts