How to Change camera Aspect Ratio with Device orientation (Android)
My camera's aspect ratio doesn't change when my sensor goes from portrait to landscape making the game very distorted. Is there a way to go around this? I was hoping I could add a branch that detected the orientation of the device, but I can't seem to find anything I could add to the blueprint to detect it. Would the simpilest method be to remove restraints on the camera? It doesn't sound too good an idea to me.
An example from another thread of someone doing landscape to portrait: https://forums.unrealengine.com/attachment.php?attachmentid=16452&d=1415337434
asked Mar 28 '15 at 02:09 PM in Blueprint Scripting
I am not sure, if this is what you want, but I found a solution for the problem, that my game looked heavily distorted in portrait orientation. The problem actually is, that the Field of View (FOV) is calculated between the left and right edges of the viewport. So if you have a FOV of 90° and an aspect ratio of 16/9 in Landscape, the horizontal FOV is 90°, but the vertical FOV is 50.625°. In Portrait the horizontal FOV is still 90°, because the FOV is applied horizontally, i.e. between the left and right edges. But the vertical FOV is now 160°, because the vertical length of the viewport is now greater than the horizontal width. So to fix this, I created a custom PlayerCameraManager in C++:
answered Sep 26 '16 at 04:49 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here