VisibilityNotifier can see through walls, is there a fix

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By headingwest

I’m using a VisibilityNotifier for my 3D project. It seems to be able to see through walls and around corners. Basically if I face in a direction (say North) then any object in that direction within the Far distance will trigger the visibility notifier. Even if there’s another object in the way that blocks the camera view.

Is there a way to fix this? I only want objects that are actually visible on the camera to notify.

image

:bust_in_silhouette: Reply From: Calinou

VisibilityNotifier is intended to perform approximate checks rather than exact checks. If you need exact checks, use a ray casting solution instead. It will be slower, so you may want to perform it only from time to time using a Timer node.

:bust_in_silhouette: Reply From: Merlin1846

The visibility notifier only checks if the node is on the screen it doesn’t actually know if the user can see them.

That and I looked at your image what you want to use is a light2D, that would work perfectly.