[First post; excuse the newbishness.]
I'm trying to make security cameras that can be attached to any number of in-game monitors via a dynamic script.
To do this, I've set up a custom scene for the visible camera object, along with a Viewport and Camera.
However, when I run the script, the Camera doesn't seem to position itself relative to the cylinder representing the camera.
It's definitely the right camera; when I move it around in the Remote viewer during gameplay, the screen updates itself.
I've tried setting camera.transform = cam1.transform
, but it just sends the Camera to someplace far away.
Am I doing something obviously wrong?
cctv_camera.res
The camera is positioned relative to the visible in-game camera mesh.

Main_Scene
cam1 (instance of cctv_camera.res) is the red cylinder on the map

Local hierarchy
The local hierarchy has an instance of cctv_camera.res, along with a MeshInstance for the monitor screen as a sibling.

Remote hierarchy

Gameplay
The camera view is from a completely different point on the map, not relative to the placement of cam1.

Script (attached to cam1)
extends Spatial
func _ready():
var port = self.get_node('Viewport')
var monitor = self.get_node("../CCTV_monitor")
var mat = monitor.get_surface_material(0)
mat.set_texture(SpatialMaterial.TEXTURE_ALBEDO, port.get_texture())