The PlaneTracker
class provides functionality for locating a 3D plane based on 2D screen coordinates.
When accessing the realScaleActive
and realScaleSupported
properties, ensure that Real World Scale is enabled in the PlaneTracker object's Inspector panel. See the Real Scale for World article for more information.
Inherits From : SceneObjectBase
Property | Description |
---|---|
| (get) confidence: StringSignal Returns tracking confidence level info. This value indicates if PlaneTracker is currently tracking and how confident it is in reported results. Possible values:
|
| (get) mode: StringSignal<TrackingMode> Specifies if this tracker object should track horizontal plane or moving object. Note: on invalid value provided in setter, the mode will default to TrackingMode.PLANE .See Also: PlaneTracker.setMode . |
Method | Description |
---|---|
| performHitTest(screenXLocation: number, screenYLocation: number): Promise<Point3D> Returns a promise that is resolved with a point on tracked plane in local coordinates of PlaneTracker (in 3D units) or null if plane is not found at given screen location. |
| setMode(mode: StringSignal<TrackingMode>, config?: {fallback: TrackingMode}): void Specifies if this tracker object should track horizontal plane or moving object. Note: on invalid value provided in setter, the mode will default to fallback (or TrackingMode.PLANE if fallback is not specified).See Also: PlaneTracker.mode . |
| trackPoint(screenLocation: Point2D): void PlaneTracker origin is bound to a point in 3d space, located on detected plane. This method updates PlaneTracker to track 3d point currently under given screen coordiantes. This also triggers new plane detection, in result this object's transform will be modified. Version with signal parameters can be used in touch gestures for continuous updating: TouchGestures.onPan().subscribe(function(gesture) { |