Search Unity

How best to handle device orientation

Discussion in 'AR' started by MF_Danny, Mar 10, 2020.

  1. MF_Danny

    MF_Danny

    Joined:
    Sep 4, 2019
    Posts:
    12
    Hey there,

    So currently building an ARF app (obviously) and all is going pretty well. One thing I'd like to ask is how to best handle orientation? I have looked at using setups where I have two UI's that are toggled based on the 'DeviceOrientation.' or 'OnRectTransformDimensionsChange'. I issue I have is that as the game wrapper 'rotates' the camera image and game camera rotate too and so you get a momentary warping as the image adjusts, turning off 'Animated AutoRotation' in the player settings just causes a flicker instead.

    So basically, is it possible to make it so that just the UI and screen coordinates rotate? Or is this going down the route of lots of scripting and problems with varying device specs etc?

    Cheers,
    Danny
     
    spider853 likes this.