docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Compensate orientation

    If this setting is enabled, rotation values reported by sensors are rotated around the Z axis as follows:

    Screen orientation Effect on rotation values
    ScreenOrientation.Portrait Values remain unchanged
    ScreenOrientation.PortraitUpsideDown Values rotate by 180 degrees.
    ScreenOrientation.LandscapeLeft Values rotate by 90 degrees.
    ScreenOrientation.LandscapeRight Values rotate by 270 degrees.

    This setting affects the following sensors:

    • Gyroscope
    • GravitySensor
    • AttitudeSensor
    • Accelerometer
    • LinearAccelerationSensor
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)