0 votes

Hey folks:

Let me describe what I'm trying to do. I want to have several meshes in the foreground, then several meshes in the background... BUT I want to ENFORCE that the foreground meshes will be drawn over the background ones, even if the player is closer to the background ones.

If 3D cameras/viewports had layer IDs like 2D, I could do that. Or if I could set the blank (undrawn) screen area of one camera/viewport to display the contents of another, I could do that. Are either of these possible? Can I enforce that a subset of meshes will be rendered under another subset regardless of distance?

Thanks Godot users!

in Engine by (56 points)

Maybe you could trick the depth of the background mesh so that it appears the same in "2D" side view, but in 3D it's just a lot further away. So you would still have a possibility for background to be drawn above, but due to a proper setup that may never happen (because your game works in a particular way that makes you able to assume that).

Or you could render that mesh in an offscreen viewport, but like you said I don't know if that works in 3D... (like, rendering Sprites/UI BEHIND 3D stuff??)

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 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 webmaster@godotengine.org with your username.