0 votes

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!

in Engine by (49 points)

Have you looked into using a Viewport as a texture?

1 Answer

+1 vote
Best answer

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

by (4,530 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.