Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official, universal solution to camera rotated by gyroscope

Discussion in 'Editor & General Support' started by luisanton, Jan 20, 2015.

  1. luisanton

    luisanton

    Joined:
    Aug 25, 2009
    Posts:
    325
    How is it that there’s no ‘official’, universal solution to rotating a camera using gyroscope/compass+accelerometer? There are tons of threads offering solutions but none seems the right one, or universal enough (some work on iOS, some on Android, some on Phones, some on tablets...)

    I got mine working on iOS devices, but looks awful on Android. Is there an official tutorial I'm missing or something? :m
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
  3. luisanton

    luisanton

    Joined:
    Aug 25, 2009
    Posts:
    325
    Indeed, that's a pretty neat solution! I just tested it on a MotoG and it works. Not 'official', though, not a one-line solution by any means, but at least it works.

    Dunno, I think it's a pretty interesting thing to be solved internally and offered as part of the Gyro API :)