Use trigger collision or position check?

The context is:

  • mobile and browser game (performance!);
  • 2.5D Top down perspective (camera sees Y-);
  • Movement from top to bottom part of the screen (the main character actually moves “bot-up”);

I got this scenario elements moving at the background of the game. They’re just planes with a texture. I removed the mesh collider from them. And they’re created beyond top border of the screen and the camera movement makes them appear moving beyond the bottom border of the screen. No big deal until there.

When they reach a position beyond camera’s field of view I wan to destroy or relocate them and I know how to do both. My question is about what would cost less in terms of processing to check if the scenario element has reached a position in relation of the camera’s current position (over the Z+ axis BTW).

If I setup a object at that position to collide with the planes, and change the collision matrix to make the scenario elements just collide with this “game bottom border” would be a good solution? Or attach a simple script to each plane with a camera reference and each frame (or skipping one or two frames to save processing) check its relative position to the camera to know when destroy itself would be better thinking about the performance on mobile devices?

Thanks for your help.

The real answer you only know doing a performance test in a real device.

I think that both options are ok. Checking the object position relative to camera is one matrix multiplication. But collider could be optimized by the engine.

Personally I give a try in the first one.