Help with render script - render past fixed view

What I’m trying to do

  • Generally scale and keep proportional virtual resolution area compared to window size
  • Gameplay area stays in virtual resolution, UI floats only to virtual resolution size
  • Fit virtual height to height of window
  • If width is wider than window width then draw to the left and right and center virtual resolution area - I’ll have background textures and animations out there
  • If width is wider than computed distance then draw black bars
  • If width is equal to virtual width but height is tall then center virtual resolution vertically and draw a little extra background scene in case for super wide screen displays in portrait, and then after draw black bars above and below

This could be applied to landscape and portrait style layouts

Still working on it. Any tips welcome.

1 Like

Success! I’ve mostly got it working, and it was easy, would have been done faster if I was more experienced with these sorts of things. Will post render script once I polish it up.

Edit: By mostly getting it working, I mean very hacky way of getting it to work. It looks right but I know the method is wrong. I’ll still share what I have soon.

2 Likes