0 votes

EDIT: The camera wasn't moving because the viewport wasn't. I'm having problems with the viewport not moving with the model, not the camera

EDIT 2: Found out that I can move the camera out of the viewport node and have the screen work in-scene, but not once the scene is an instance in another. The screen stops displaying all together

I am working on a game, and I'm trying to make a screen display the image from a camera. The camera, screen, and the model are in a scene of their own (link to node tree image). The camera is not moving, however, even though it is a child of the model. Is there a way to set make it stay with the model?

Here's a screen shot of the problem, the camera look find here (Snowman is part of the main node)


But once it's moved over the camera stays in the same spot

And here's the node tree

asked Jul 3, 2019 in Engine by ConsumerJunk (15 points)
edited Jul 4, 2019 by ConsumerJunk

What's the Viewport for if there's nothing but a Camera?

1 Answer

+1 vote
Best answer

The camera is not moving because when a Spatial node is not child of another Spatial, it considers to be in global coordinates, even if there are spatial nodes further up the tree. This is especially relevant with Viewport because these can be used to simulate independent worlds from the one the viewport is child of.

You should probably assign your camera's transform by script to reflect the position you want, or use the RemoteTransform node: https://docs.godotengine.org/en/3.1/classes/class_remotetransform.html

answered Jul 4, 2019 by Zylann (26,139 points)
selected Jul 4, 2019 by ConsumerJunk
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.