In reading around, it doesn’t seem the UE4 community touches on this like the Unity community does. Maybe that’s because there are more 2D projects in Unity? Who knows? But I prefer UE4 regardless.
From my understand, given the screen height/resolution of the game/tests, the pixels per unit must be correct, otherwise the 2D image gets blurred or clipped ever so slightly. I’m having this happen as well. I’ve went for over a week now on the very small amount of posts touching this subject, and no avail, until I read on a site relating to Unity where they grab the screen height and sprite size to set the orthographic camera distance and get the pixels showing correctly by that:
long equation: cam size = x(((x/y)*2)*s)
shortened: cam size = y / 2s
where:
x = Screen Width (px)
y = Screen Height (px)
s = Desired Height of Photoshop Square (px)
(see here: Pixel Perfect Calculator for Orthographic Camera : Unity3D | Indie Hood Games)
I know UE4 works differently, as I’ve used Unity myself to test this out. UE4 uses the orthographic width to set everything. What I need to do is similar to the equation for Unity, but dynamically readjust the camera distance per the resolution/screen height so the 2D image (character actually) shows up correctly regardless of the screen height, for all 2D images all the time.
Is this possible to do in blueprints? Am I understanding this right? I don’t even know where to start to be honest. If I need to add more details or something just let me know in a comment and I can. This is an attempt for the “pixel perfect” settings, and it just seems not too many people have really talked about doing it this way, where it’s a way more common way in Unity. Maybe I’m missing something somewhere else, but this seems like the ultimate, correct approach.
Also to note, setting the orthographic camera width at 600, with a character that is inside a sprite box the size of 150x150, and pixels per unit is at 1, it shows up nearly perfectly. It’s in different screen sizes/resolutions that it distorts or blurs horribly, and with a PC game there are all sorts of different sizes to adjust to. I’d also prefer to use something larger than 600 to show more.
Any other solutions are welcome. When the screen size changes, if it’s not the “perfect size”, it blurs and distorts, and sometimes completely removes/condenses pixels on the 2D character. I just need to know a way to have this not happen, as plenty of people have tons of different monitors and different sizes, and would prefer all sizes and resolutions, which you’d figure an engine like UE4 could do.