Camera information for `VisibleOnScreenNotifier3D`

Godot Version

4.3

Question

I’m using the VisibleOnScreenNotifier3D, but I have two “current” 3D cameras for a split-screen game. It seems that VisibleOnScreenNotifier3D.is_on_screen will be true when either of the two cameras can see the VisibleOnScreenNotifier3D node. How can I tell which of my cameras can see the node?

I’m working in GDExtension with godot-cpp for this code, using my own camera subclass, so I can do things a little more “under the hood” if needed.

Use signals instead
image
OR

func _ready():
	var vis_on_scr = get_node("VisibleOnScreenNotifier3D")
    vis_on_scr.screen_entered.connect(_on_screen_entered)
	vis_on_scr.screen_exited.connect(_on_screen_exited)

How will connecting signals give me information on which camera triggered the screen entered/exited?

in one of your singletons make a special func that runs related to that node code or emits its reference

inside of VisibleOnScreenNotifier3D node:

func _ready(): screen_entered.connect(func(): Singleton.cast_reference(self))

It seems that there is confusion around the issue that I’m struggling with. I’ve added bold formatting to the text of the first comment where I asked my question to help emphasize what I would like:

How can I tell which of my cameras can see the node?

Camera3D.present_on_screen does not exist. Are you using ChatGPT or some large language model AI to write your posts?

(Edit: the comment I was referring to has been deleted.)

var present_on_screen:Array is a variable that you have to create in camera script

Ok, please let me know if you can figure out how to write this sort of a function. That’s the functionality that I need.

ask GPT