How to check an object is on screen?


#1

Is there a way to check whether an object is on screen, fully or partially? I’m tempted to use AABB using the camera position and screen size, but I’m wondering if there’a a better way.


#2

if you want to check something on some where like screen , i suggest to create a background that cover your whole screen ( like light blue or live action backgrounds ) then add collision between that thing and your screen ( background )


#3

My background is a large multi-directional scrolling area. However, I like this idea and might look at an invisible object the size of the screen.

Thanks for the suggestion :slight_smile:


#4

It works. I have a sprite I call CheckForOnScreen, and set it like:

and update it’s position with: