How to project camera view onto a 3d plane

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

Hello! I am trying to project the view of a camera onto a 3d plane like a texture. I am currently working on a game and I want to add a security camera. The player should be able to see everything the camera sees on a computer display. Is that possible? Thanks in advance!

Have you looked into using a Viewport as a texture?

Ertain | 2021-02-24 21:28

:bust_in_silhouette: Reply From: Wakatta

Node Tree

┖╴Position3D
  ┠╴Viewport
  ┃  ┖╴Camera
  ┖╴MeshInstance

Viewport Settings
Size = Anything that is not zero and is po2 example x:512 y:512
Transparent Bg = On
Render Target > V Flip = On

Camera Settings
Current = On

MeshInstance Setup
Mesh = QuadMesh
Material = SpatialMaterial

SpatialMaterial Setup
Resource > Local To Scene = On
Flags > Transparent = On
Flags > Unshaded = On
Albedo > Texture = New ViewPortTexture > Viewport