lens-studio-marker-tracking

Installation
SKILL.md

Image Marker Tracking

Standard lens studio image tracking binds 3D content directly to a printed image marker, so when the marker is hidden, the object disappears. By combining the MarkerTrackingComponent with DeviceTrackingMode.World, you can execute the "World-Locked Marker" pattern.

The World-Locked pattern detects the marker once to calculate its physical coordinate in the room, and then deliberately unparents your 3D content so it stays permanently pinned to that location in World-Space, regardless of whether the camera is still looking at the physical marker.

Official docs: Spectacles Home

Basic Marker Component Setup

First, make sure your Main Camera has a DeviceTracking component set to World mode. Then construct a standard MarkerTrackingComponent.

// 1. Grab camera and assert tracking mode
const mainCamera = global.scene.getRootObject(0).getComponent("Component.Camera");
const deviceTracking = mainCamera.getSceneObject().getComponent("Component.DeviceTracking");

if (deviceTracking.getActualDeviceTrackingMode() === DeviceTrackingMode.World) {
    // World space is active! We can use world-locked markers.
}
Related skills

More from rolandsmeenk/lensstudioagents

Installs
3
GitHub Stars
5
First Seen
Apr 24, 2026