This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I have a world with sprite objects in it. These objects may be a great distance apart but may overlap on screen at some point due to reasons. I have two Viewports for this purpose. I want the Viewports to respect the object's Z-Levels, regardless of which Viewport is higher/lower in the node tree. As it currently stands, the Viewports are treated like their own canvases and draw the objects like layers in Photoshop.

For example, if I have Object A in Viewport 1, and Object B in Viewport 2.
Object A has a Z level of -10, Object B has a Z level of +10. If Viewport 1 is lower in the scene tree then Object A renders on top of Object B, despite having a lower Z level. I need to avoid this. I need the Z-levels respected regardless of where the Viewport is in the node tree.

This may not be possible at all, or it may have more to do with Cameras or Canvases than Viewports, but it's a linchpin of my current project and will tank the whole thing if I can't resolve the visual glitches that result.

Godot version 3.3.3
in Engine by (25 points)

Please log in or register to answer this question.

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.