[SOLVED] Landscape Camera Setup

Hello,

As we know playcanvas does not support force landscape mode… But i already made game which is landscape based… But stuck with this cam problem…

So here is script which works great in normal mode… And my game need to be Landscape so i setup playground accordingly…
Here is the project link…

https://playcanvas.com/editor/scene/1146948
So cam rotates when you click and drag…

I need help with camera script which works according to portrait mode which does not work properly in Landscape perspective…

Can anyone help to fix this camera problem for landscape mode…
Thank you very much!

Edit:
:arrow_forward: PLESE NOTE: TURN OFF AUTO ROTATE ON YOUR MOBILE DEVICE… BEFORE TRING THIS…

What’s the issue when the device goes landscape?

:arrow_forward: PLESE NOTE: TURN OFF AUTO ROTATE ON YOUR MOBILE DEVICE… BEFORE TRING THIS…

It is not behaving properly when we move cam into sideways… (It is behaving according to Portrait mode)

I added sniper image for better understanding…
Here in this image everything looks perfect.

But later on when we move right and then down the angle does not look proper… Check the following image (Same thing with left angle)

In technical term the rotation of left and right side is does not act properly…

Edit:

It is somewhat same case when we look up in the editor and try to move mouse horizontally…

Here i managed to solve the camera issue added parent to it…

https://playcanvas.com/project/793394/overview/cam-landscape-fixed

Front View

Side view


1 Like