How to detect when object it is on-screen? bge I was wondering if it is possible to detect an object when is on-screen/visible to the camera? This feature should NOT detect an object when it's behind another object.

I highly doubt this question has been asked before. Please help...
This is easy enough from python by casting a ray from the camera to the object:

import bge
own = bge.logic.getCurrentController().owner
cam = own.scene.active_camera
own_screen_pos = cam.getScreenPosition(own)
result = cam.getScreenRay(*own_screen_pos, 100)
if result == own:
    print("The object can be seen")
else:
    print("The object cannot be seen")


Be aware this will only check the centerpoint of the object rather than the edges.