Download

Camera Ortho Width when the viewport resize

Hi,
Is it possible to have the viewport resize event to change the ortho width of the camera to keep pixel perfect ?
How achieve that correctly ?
Thanks

You need a delay node on a blueprints begin play event, then the Get Viewport Size node (https://docs.unrealengine.com/latest/INT/BlueprintAPI/Viewport/GetViewportSize/index.html), then you divide the viewport width by 2 and set that as the camera ortho width.

This will fire only when something begins play, is there a way to fire an event specifically for when the viewport resizes?

In blueprint we will need to make you notify event by tracking viewport size very tick , otherwise you will need c++ for that !

test463.PNG

I see, thanks for the detailed BP. I was fearing C++ would be the only way to do a proper callback, confirmation is greatly appreciated.

Cheers!