0 votes

Here is a picture to get a better understanding: https://pasteall.org/pic/60fcab5ef15a4b0b94e0382a8798762a

Also when I start my game and try to see through the mesh instance it shows the model for a second but then it goes away , and Im sure the camera is falling I wasnt aware the camera has physics, does viewports have no hierarchical system so nodes dont follow other nodes, also in the editor when moving all of the object the camera in the viewport doesnt follow anything, how can I fix this?

okay after a few more testing, looks like the black is actually the sky/environment so the viewport wont render the sky but models are okay, so the next issue is that the camera doesnt follow the model and the falling I was experiencing was actually the model being moved while the camera stay in one position.

here is a picture of me rotating the object but the camera not moving: https://pasteall.org/pic/38bae6cf60db4b08bbef1a8f73f0b81a

Godot version 3.2.3
in Engine by (164 points)

1 Answer

0 votes

Normally children follow the parent so you should make sure that the objects you want to follow the moving object are the moving objects children.

by (254 points)

I understand that, it's just that anything in the viewport ignores that system which I don't want it too.

I see now. It is because the parent of the camera is a viewport which isnt a spatial node and the camera needs to be a child of the viewport (or does it?). The way i fixed this was by setting the global transform of the camera manually in script every frame.

Is setting it in code the only option, it's doable but kinda feels messy

Yes it is messy but sadly I think it is the only option.

I actually found a better solution, remote transform it keeps a node the same position as it's self including hierarchical structure

Thanks, I never knew about that.

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 Frequently asked questions and 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 [email protected] with your username.