GameObject screen bounds - i'm going nuts

Hello,

I’m going crazy with an apparently simple problem. I need to get a simple box (x1, y2)-(x2,y2) that represents the screen area a GameObject is being rendered onto.

I’ve been trying to use Renderer.bounds, but the resulting coordinates are in 3D space, and simply using Camera.WorldToScreenPoint with the min and max of the bounds doesn’t seem to cut it, and results in hugely varying boxes.

Is there a simple way (or a not so simple way for that matter) to calculate and draw the limiting/bounding box of the screen rendition of a GameObject?

Thanks

Hugo

Bump? Please? pretty please?

Thanks. It’s just that it seems a really simple problem and there must be a better solution than just to raycast upwards iteratively until I don’t hit the object…

Thx

What was the solution to this problem? I am interested in a similar functionality.