Need help making my orthographic camera match a world space widget

I’m trying to get a widget containing a 1920x1080 background image to span perfectly across any screen size in 3D space. I’m using PIE to test this. I have an orthographic camera set up with a widget component attached. The orthographic camera is set to a width of 1920.

The widget component’s draw size is set to the viewport size via this blueprint.

This is the output. The aspect ratio looks right, but the orthographic camera width/height is significantly off as you can see with the black borders around everything.

Interestingly enough when I eject from the player pawn and then select the player pawn’s camera, the preview looks correct.

I am about 99% certain PIE is starting with the correct camera (The one with the preview), so I’m a bit confused here and I’ve been using AI and tinkering around with it for several hours before making sure this hasn’t been asked before and posting here.

Thanks

After about 8 hours of wrapping my head around it, I’ve figured it out.

  1. Make sure your widget properly shrinks and expands in size (I used a scale box).
  2. Go to your camera and enable “Override aspect ratio axis constraint”
  3. Set it to maintain X Axis
  4. On your camera, set the orthographic width to 1920 (Probably works with other values)
  5. Attach the following blueprint

What a pain to get such an incredibly small thing working.

1 Like