How to make a monitor with surveillance cameras?

Godot Version

4.4

Question

I am trying to make sure that all the cameras “Camera[1, 2, etc]” located in the child object “CamHub” are loaded into the monitor object “Monitor” and broadcast on it.

I was able to make the “CamHub” object collect all the “subviewports” from the child “Camera[1, 2, etc]”.

I also made it possible to reference the “CamHub” object in “Monitor” via “@export”.

The question is, how do I make the “Monitor” object display what the cameras see?

Scene tree and how monitor connects with CameraHub:

CamHub script:

Camera obj tree:

Monitor tree and script that should work but its don’t (without any errors):

You need to assign the viewport NodePath to the sprite3d.texture.viewport_path thats all.

or you can just use the assign button if the viewport is in the same scene

since it looks like your camliststr already has the cam node. just change it to

Screen.texture.viewport_path = CamHub.camliststr[channel].get_path()
1 Like

Thanks you!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.