How to keep 4:3 game aspect ratio while in fullscreen mode?

Newbie to UE here. I want to make a VN designed with a fixed 4:3 aspect ratio in mind. All widgets, no 3D stuff, blueprint project. Long story short, the aspect ratio looks fine when in window mode (packaged version):

however, when I go in fullscreen mode, the game window’s width is stretched to fit the width of the monitor, resulting in the following look:

when it should be something like this (notice the black borders on each side):

I don’t mind having black borders, I mean it would be cool if I could replace them with custom artwork like in those vertical scroller japanese shmups (no idea how to do that) but that’s optional for now, I tried looking for a solution on other sites but 99% of the time I’ve no idea what I’m reading. I’d be really grateful if somebody here could help me on this one

Hey @Tukankaloso

Forcing aspect ratio is a little bit annoying. I don’t know if there are other solutions, but I figured this works some time ago.
image

That’s the Widget structure to ensure aspect ratio while being able to put stuff on the borders in case you don’t want them to be black.

The actual content goes inside Overlay_Container or in the Canvas_Panel above it.

Now the setup for each part:

First ScaleBox

Set the anchors to Fill
image

Horizontal Box

Fill space. This allows the main content (Forced 4:3 aspect ratio) to have custom borders on each side, so you can add custom images, widgets or whatever you want to fill the black borders.
image

Both Borders

image

Second ScaleBox

image

SizeBox - The actual aspect ratio

1920 x 1440 is exactly 4:3 aspect ratio, which will be adapted in size by the ScaleBox for any possible screen resolution. It’s important to set a reasonable size instead of 4x3 directly cause all the content inside will be scaled relative to this.
image

The CanvasPanel on the top (parent UMG) is not necessary, I just keep it for organization.

(failed to quote Grim correctly in this post, actual reply is below)

I’m 1 month late but thanks for the answer. Haven’t had the opportunity to implement your solution yet but I’ll keep it saved in case I pick up this project again.

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