a viewport renders models but makes the environment black and camera doesnt follow the model

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

Here is a picture to get a better understanding: Legobet88 🀄 Trustworthy Agen Situs Slot Online Bet88 Terpercaya Ter- Gacor Hari Ini 2024

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: Legobet88 🀄 Trustworthy Agen Situs Slot Online Bet88 Terpercaya Ter- Gacor Hari Ini 2024

:bust_in_silhouette: Reply From: cascas

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.

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

Dragon20C | 2021-01-21 16:17

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.

cascas | 2021-01-21 16:26

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

Dragon20C | 2021-01-21 16:49

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

cascas | 2021-01-21 17:58

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

Dragon20C | 2021-01-21 20:30

Thanks, I never knew about that.

cascas | 2021-01-21 21:31