Can you overlay multiple cameras in Godot?

Godot Version

4.3

Question

Hi all,

I”ve been trying to overlay multiple cameras but not having much luck. Is there a way to do anything like that in Godot? I can’t seem to find much on it so I thought I’d check here.

Thanks,
Pete

Not sure I understand what you mean exactly, but you can combine SubViewports that use their own cameras. That way you can have multiple cameras rendering in one. The subviewports need to be connected to something that actually renders them, like a SubViewportContainer or TextureRect.

2 Likes

Oh thanks! I’ll look into that. :slight_smile:
In this instance I was planning to have a game view camera, and a UI view camera (with different layer masks). The UI camera would be rendered over the top of the game view camera.

That should work, but it requires the viewport texture to have transparency, which I’ve never tried, but maybe it’s enough if the camera is facing the void and the texture has a transparent background. :thinking:

1 Like

Cool I got something working here, it’s a little whacky :crazy_face:
Thanks for the help!

Screenshot 2024-11-22 at 11.49.50 am

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.