How to get current camera aspect ratio?

I’m trying to set Ortho Height instead of Ortho Width for an orthographic camera. For this, I need the current aspect ratio of the camera. How can I get this?

Here is my current blueprint:

http://puu.sh/gt6r4/a9ff9deff6.jpg

Notice Camera has Aspect Ratio property, but it just stays the initial value.

1 Like

You can set and find the Set Aspect Ratio node by making sure that the Constrain Aspect Ratio is checked in your camera component’s Camera Settings.

I want to get the current aspect ratio, not set it… I don’t want to constrain the aspect ratio. I want to change the camera’s ortho width based on the aspect ratio.

1 Like

You can find the Get Aspect Ratio node in a similar way. The minimum aspect ratio is 1 and the maximum is 2.5. 1 will give you a very thin but high ratio while 2.5 will give you a very large but short ratio. You cannot actually stretch the camera’s width or height alone like you seem to want to do. But by adjusting the Aspect ratio, you may get a similar effect. Hopefully this will help you out.

This [Camera Documentation][1] goes over all the camera properties. The camera works the way that it does by taking in consideration the screen of computer monitors or mobile devices and tv’s which all use Aspect Ratios.