WebXRImageTracking allows you to track images in the real world and place objects on top of them.
This component is only available in WebXR sessions.
The WebXRImageTrackingModel contains the image to track, the object to place on top of the image, and the size of the image as well as settings for the tracking.
Used by the WebXRImageTracking component

Constructors

Properties

createObjectInstance: boolean = false

If true, a new instance of the referenced object will be created for each tracked image. Enable this if you're re-using objects for multiple markers.

hideWhenTrackingIsLost: boolean = true

Enable to hide the tracked object when the image is not tracked anymore. When disabled the tracked object will stay at the position it was last tracked at.

true
image?: string

Tracked image marker url. Make sure the image has good contrast and unique features to improve the tracking quality.

imageDoesNotMove: boolean = false

Use this for static images (e.g. markers on the floor). Only the first few frames of new poses will be applied to the model. This will result in more stable tracking.

false

The object moved around by the image. Make sure the size matches WidthInMeters.

widthInMeters: number = .25

Make sure this matches your physical marker size! Otherwise the tracked object will "swim" above or below the marker.

0.25 which is equivalent to 25cm