# How can I set vertical AND horizontal FoV independent from each other with a cine camera in C++?

**URL:** <https://forums.unrealengine.com/t/how-can-i-set-vertical-and-horizontal-fov-independent-from-each-other-with-a-cine-camera-in-c/1444658>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [December 1, 2023, 2:49pm UTC](https://forums.unrealengine.com/t/how-can-i-set-vertical-and-horizontal-fov-independent-from-each-other-with-a-cine-camera-in-c/1444658 "2023-12-01T14:49:53Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![SarahH05071](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SarahH05071](https://forums.unrealengine.com/u/SarahH05071)\
**Post date:** [December 13, 2023, 8:03am UTC](https://forums.unrealengine.com/t/how-can-i-set-vertical-and-horizontal-fov-independent-from-each-other-with-a-cine-camera-in-c/1444658/5 "2023-12-13T08:03:19Z")

</div>

Found a solution that worked:

> [@Display with non-square pixels](https://forums.unrealengine.com/t/display-with-non-square-pixels/396767):
>
> I am trying to support device with non square pixels. Display has aspect 16:9, but resolution is 1920x540. Even aspect is 16:9, image is rendered in 32:9 aspect, because it keeps pixel aspect 1. Constrain aspect is not solution too, because it adds only black stripes and keep pixel aspect 1. Is there easy way to force pixel aspect different from 1?

> [@Howto modify the projection matrix](https://forums.unrealengine.com/t/howto-modify-the-projection-matrix/287457/72):
>
> Hi, Thanks a lot. I managed to get your example project up ad running and it works fine. However, when I can’t get the same result when I add the OffAxisGameViewportClient class to my game. There were no errors when I was trying to compile the class and I modified the build.cs file of my project to add the dependencies In the editor, I’ve added a camera to the level and made player 0 auto-possess that. My level blueprint is also identical to yours. I’ve also added a blank C++ game mode class a…

You can overwrite CalcSceneView to get non-square pixels.

---

_[View the full topic](https://forums.unrealengine.com/t/how-can-i-set-vertical-and-horizontal-fov-independent-from-each-other-with-a-cine-camera-in-c/1444658)._
