Preparing search index...

    Component that configures device tracking behavior and options.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Create a scene object with DeviceTracking for AR
    const obj = scene.createSceneObject('ARTracker');
    const tracking = obj.addComponent('DeviceTracking') as Editor.Components.DeviceTracking;

    // Set to world tracking (full 6DoF)
    tracking.deviceTrackingMode = Editor.Components.DeviceTrackingMode.World;
    console.log(`DeviceTracking: mode=World (${tracking.deviceTrackingMode})`);

    // Switch to surface tracking
    tracking.deviceTrackingMode = Editor.Components.DeviceTrackingMode.Surface;
    console.log(`Switched to Surface (${tracking.deviceTrackingMode})`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    deviceTrackingMode: DeviceTrackingMode

    Active device tracking mode.

    enabled: boolean

    Whether the component is active.

    id: Uuid

    The unique id of the entity.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    name: string

    Name of the component.

    rotationOptions: RotationOptions

    Configuration for rotation tracking.

    sceneObject: SceneObject

    Scene object this component is attached to.

    surfaceOptions: SurfaceOptions

    Configuration for surface tracking.

    type: string

    The entity's type.

    Methods

    • Returns the name of this object's type.

      Returns string

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean