![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | fractile |
I have a scene for rendering a HUD containing following hierarchy:
Spatial
- Viewport (fixed size)
-
- Control (with script to draw the HUD contents)
- MeshInstance (QuadMesh with material using ViewportTexture)
This scene is instantiated in front of player camera in the main scene.
It all works well until I switch to full-screen mode or resize the main window. After that all characters in the HUD show up as rectangles: https://i.imgur.com/r0Mt1qn.png
I found out that calling Control’s update() method manually after main window resize fixes the texts. That leads to the questions:
-
Why does resizing main viewport require updating other viewports and why does that not happen automatically? Am I doing something wrong here?
-
Where should I call the update() method? As this viewport is not resized, I’m not getting any resize signals or notifications within this scene. Listening to main viewport size changes and manually updating all other viewports feels a bit hacky solution…