Lens Scripting API

    Class Gyroscope

    This class has been Deprecated. Please instead use the DeviceTracking component with Tracking Mode set to Rotation. See the Tracking Modes guide for more information.

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

    //@input Component.Gyroscope gyro

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

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    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.

    sceneObject: SceneObject

    The scene object 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

    MMNEPVFCICPMFPCPTTAAATR