dthrasher90 Posted May 5, 2017 Share Posted May 5, 2017 hey guys, how do you set world bounds on a top down 2d game? I have an image I uploaded and I want to set the bounds to xy(700, 300), using arcade physics. What does that look like? Link to comment Share on other sites More sharing options...
samme Posted May 5, 2017 Share Posted May 5, 2017 https://photonstorm.github.io/phaser-ce/Phaser.World.html#setBounds Link to comment Share on other sites More sharing options...
dthrasher90 Posted May 5, 2017 Author Share Posted May 5, 2017 is there a way to constantly check the sprite's x,y coordinates, so I can fire a callback when it crosses a certain area? Link to comment Share on other sites More sharing options...
RubbleGames Posted May 6, 2017 Share Posted May 6, 2017 The update function runs 60 times per second, so anything you do inside it will be done as close to constantly as makes any difference. You could use an if statement to see if your sprite's x/y co-ordinates fall within the area. Link to comment Share on other sites More sharing options...
Recommended Posts