Is there a way to check if an object's surface is being rendered on screen? (Is in POV.)

I want to check if an object’s surface is being rendered on the screen,

but WorldToScreenPoint only counts for position (not size).
(WorldToScreenPoint - Album on Imgur)

local c = workspace:WaitForChild'Camera'

game:GetService("RunService").RenderStepped:Connect(function()
	local v,e = c:WorldToScreenPoint(workspace.Part.Position)
	if not e then
		print(e)
	end
end)

Edit:
Alright so I found a more simple way of explaining this:
How do I check if an object is in a player’s POV ?
Like I’ve stated, I am very aware of ‘WorldToScreenPoint’ and such functions, but because they are one position and not the entire object, it is terribly inaccurate.
Any help is appreciated!

You could probably check each corner of the part with WorldToScreenPoint, assuming the part is a rectangle

yes i’ve thought of that, the only problem is that there is always a way to put your camera to where you can see it but you arent looking at the corners, and to fix this i’d need to make an infinite amount of points

also weird issue where if it’s behind the topbar it thinks it’s not on screen

edit: i used WorldToViewportPoint instead and that seemed to fix that issue

1 Like

Alright so, it seems as if there is no current way to do this,
so I have came up with a solution that gets it perfect almost 100% of the time,
it doesn’t ever say no if it is on the screen, but there is a very small chance it will say yes if it is off.
If anyone ever finds a way to do this perfectly, please reply to this post, or DM me.
(If anyone is interested, I added it to RNMU.)