how to check if something is off screen or onscreen its a random generation thing

how to check if something is off screen or onscreen its a random generation thing

Get the position of whatever object has the camera in it, then say if the object is more than 160 pixels away from the camera object, its off screen (if the player is in the center of a 10x10 game).

@“JR 01” how would that work in a 20,9 game?

2032(pixels/grid block)=640
If camera is centered the limits are at 640/2?+/-320 in X.
For Y you do the same game with 9
32…
That’s what you wanted to know @glithctyrus ?

Tinkersmith is exactly right.

20x9 would be 320 pixels away Horizontally and 144 pixels away Vertically from the center.
Anything further than that would be off screen.

so can I get a screenshot of how it works