The obvious ways are to either:
- OnTriggerExit for a box collider which wraps the stage bounds
- OnTriggerEnter for 6 flat box colliders surrounding the stage
I suppose, to start, 6 flat boundaries allow me to differentiate between falling/moving out.
OnTriggerExit could also misfire if a GO is warping to another (disconnected) stage.
But flat boundaries allow for edge cases to occur where the GO moves too fast to trigger the volume, and seem more annoying to set up consistently.
Are there other performance advantages or setup challenges to either approach?
transform.positionin Update and reacts if it's out of bounds. \$\endgroup\$