Preparing search index...

    Class MarkerTrackingComponent

    Used to track images in the camera.

    Moves the containing object's transform to match the detected image.

    Marker Tracking guide.

    //@input Component.MarkerTrackingComponent markerTrackingComponent

    // Get whether or not the marker image is being tracked
    var isMarkerTracking = script.markerTrackingComponent.isTracking();

    // Print current status.
    if (isMarkerTracking) {
    print("Image is in Camera feed.");
    } else {
    print("Image is NOT in Camera feed.");
    }

    Hierarchy (View Summary)

    Index

    Properties

    autoEnableWhenTracking: boolean

    If true, child objects of this Component's SceneObject will be disabled when the marker image is not being tracked.

    true
    
    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    true
    
    isBeingDestroyed: boolean

    Returns true if this Component is currently being destroyed. Becomes true as soon as destruction begins via Component#destroy or destruction of its owning SceneObject, before any OnDestroyEvent callbacks fire.

    Lens Scripting Version 364

    if (!script.isBeingDestroyed) {
    // Component is still fully alive
    }
    isEnabledInHierarchy: boolean

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

    marker: MarkerAsset

    The marker asset describing the tracking target.

    null
    
    onMarkerFound: () => void

    A function that gets called when marker tracking begins.

    null
    
    onMarkerLost: () => void

    A function that gets called when marker tracking is lost.

    null
    
    sceneObject: SceneObject

    The SceneObject this component is on.

    uniqueIdentifier: string

    Lens Scripting Version 176

    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

    • Returns whether the marker image is currently being tracked in camera.

      Returns boolean