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):
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
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.
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
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.
Both Borders
Second ScaleBox
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.
The CanvasPanel on the top (parent UMG) is not necessary, I just keep it for organization.
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.