You aren't providing enough information. Do you want your game to end when a collision occurs off screen? There's not really a way to stop the game, but you can go to a different scene, or pause the game. We could help if you provided us with more info.
i have multiple moving objects moving on the screen, they are moving in random directions and when they collide on the screen it results in game over which is intentional.
however, the problem is that the same collisions are occurring out of the players view when the moving objects leave the playable area. It isnt a bug, the code is working as it should. Im trying to find a clean way for disabling the collisions off screen.
What are they colliding with, each other? Do they end up coming back into the scene once they leave or are they lost in limbo? You could always set up a rule that checks their current location, and if its outside of your screen range, simply destroy the actor.
Comments
i have multiple moving objects moving on the screen, they are moving in random directions and when they collide on the screen it results in game over which is intentional.
however, the problem is that the same collisions are occurring out of the players view when the moving objects leave the playable area. It isnt a bug, the code is working as it should. Im trying to find a clean way for disabling the collisions off screen.