[SOLVED] Camera Bug in Portrait Mode

There are 2 cameras rendering different layers. One is the other’s child. There are 2 objects on the scene, centered concentric. One of these objects is rendered by one camera, and the other by the other camera. Although there is no problem in PC and mobile landscape mode; in portrait mode the centers of objects are shifted and look different.

I assume that since the cameras are nested, their position and rotations change at the same time and render the same angle.

The main camera is using the orbit camera script.

Project Link: PlayCanvas | HTML5 Game Engine

Hi @mehmedcan,

I think the issue is your first camera, using the orbit-camera.js script, changes its horizontalFov property based on the screen orientation:

If you do the same on your second camera, I pretty much feel the result will be the same.


Thanks @Leonidas , it really helped!

1 Like