How to fill the entire screen with background picture?

i want to fill the entire screen with a picture no matter the screen size. I want the ability to scroll the background in a direction if needed.

Basically anything can happen on screen, sprites, 3d but the background remains stationary with optional scrolling

Hi @Aloragames,

Check this post, it may be helpful in doing that:


I see trying to explore alternatives here, am I mistaken thinking the 2d UI would be great to work with images like backgrounds?

The question is how do then get the UI to show up behind objects in the scene? Its kind of defeating the original point of UI but methinks doing that will give me greater control over dimensions, aspect ratio and so on?

That’s a good question, thinking how to approach that. One way is to use two cameras, a UI camera that is rendering first and your normal camera that is rendering second without clearing the color buffer.

That way your UI camera will render the background at the start of the frame, and then your main game camera will render everything on top.

@yaustar do you have any other idea on that?

1 Like

Yeah, I was going to do an open office video with the method that Leonidas mentioned above


Office hours video:

Post about how layers and cameras work: [SOLVED] Layers and affect of the 'Order' - #7 by yaustar
Fixed project link: PlayCanvas 3D HTML5 Game Engine


PHENOMENAL SUPPORT! thank you for that will ask more questions later when i start implementing it

1 Like

A post was split to a new topic: How to prevent image element stretching and how to zoom?