Preparing search index...

    Class Gyroscope

    Applies the device's gyroscope rotation to the SceneObject it is attached to.

    Use DeviceTracking with Tracking Mode set to rotation. See the Tracking Modes guide for more information.

    //@input Component.Gyroscope gyro

    script.gyro.invertOnFrontCamera = true;
    script.gyro.invertRotation = true;

    Hierarchy (View Summary)

    Index

    Properties

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    invertOnFrontCamera: boolean

    If enabled, the Gyroscope's rotation will be inverted when the front facing camera is active.

    invertRotation: boolean

    If enabled, the Gyroscope's rotation will be inverted.

    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    sceneObject: SceneObject

    The SceneObject this component is on.

    uniqueIdentifier: string

    Methods

    • Destroys the component.

      Returns void

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean