jagd Posted March 3, 2015 Share Posted March 3, 2015 I'm creating a game with a very large world which will all be loaded from the beginning of the game. However, to cut down on resource use, I want to make it so objects will only do stuff if they are in the player's view. For example, an object that spawns a rockslide will only do so if it is within the player's view--or 'on-screen' if you want to use that term. How do I do this? Is there a way to say something like, if(Object.isOnScreen){ } Link to comment Share on other sites More sharing options...
blizzardmuffin Posted March 4, 2015 Share Posted March 4, 2015 Might want to delete this duplicate question. Link to comment Share on other sites More sharing options...
conradk Posted March 4, 2015 Share Posted March 4, 2015 i assume there is something in the Phaser Camera class that would be able to help you. You can use the position and its viewing rectangle to tell if something is in your view I think. haven't tried it, but that is where I would look Link to comment Share on other sites More sharing options...
Recommended Posts