My game is a “platformer”, so I have platforms regularly travelling “out of” my scene.
I’m not sure the best way to detect this situation. I have “walls”, like the Stack the Box example, which keep players and dynamic objects in the scene, but since platforms are Static (because they can’t be affected by things hitting them, and they are not supposed to collide with each other), the platforms just float right through the walls undetected.
At the moment I have a timer scanning the list of platforms for ones that are out of play and deleting them (they are pooled). Having a timer and scanning the whole list of platforms seems unduly expensive: I’m not at all keen on it.
Is there a better way?