Detecting whether a player is fully obstructed from camera

I’d like to create a system where a function is executed when a player is completely obstructed from the camera. The only solution I can think of is to create multiple raycasts from the camera pointing at each vertex of the character model, but of course this would be very resource intensive.

Player partly obstructed (function isn’t executed)
image

Player fully obstructed (function is executed)
image

Any help would be appreciated, thanks!

I’ve created a partial solution where the bounding box of the player is fetched, and the WorldToViewPoint function is used to determine whether all of the vertices on the box are unobstructed.

There are still some edge cases where this solution doesn’t work, so if anyone has a better solution please let me know!