Working with Widgets > 3D > Spatial Target
Spatial Target
What Does This Widget Do?
The Spatial Target widget allows you to use spatial tracking in an experience.
When Should I Use This Widget?
Use a Spatial Target when you want to place a model on a surface without using a ThingMark. For example, if you want to show a potential customer what a generator would look like in a certain location on site, use a spatial target when creating your AR experience.
When creating an experience that includes a Spatial Target widget, consider the following:
When viewing a spatial tracking experience on your mobile device, the shake gesture breaks tracking and returns you to placement mode. If you lose tracking, shake your device to reestablish tracking.
To break tracking on a HoloLens, say “Hey View, update tracking” or hit a “reset” button on the menu near the model.
Experiences with a spatial tracking view will only show up on supported iOS and Android devices. For more information about supported devices, see the Ground Plane: Prerequisites section in Vuforia Developer Library.
Vuforia View may not be using the most current version of Vuforia’s ground plane technology. Therefore, your device may not yet be supported for Vuforia View.
Sequences can interfere with the phantom effect during the placement phase of the experience. Currently, phantom rendering is applied to all models and model items that are explicitly declared in the TML. Any sequence applied to the model overrides the rendering mode for all model items in the sequence. If a model item in the sequence doesn't have a corresponding model item in TML, then it will not be rendered as phantom. For models with sequences, best practice is to wait to set the sequence for a model until placement is done, and to unset the sequence when tracking is lost. The Tracking Acquired event will be fired after you’ve left placement mode by tapping on the screen. The Tracking Lost event will be fired when you shake the device. Use these two events to set or remove the sequence from any models.
ThingView renderer must be enabled in your Vuforia View settings in order to view an experience that uses spatial tracking.
This does not apply to HoloLens devices.
Spatial tracking content may scale differently depending on your device.
On ARKit devices, model placement may require the device to be moved in order to initialize tracking.
On non-ARKit devices, 3D object stability may be reduced as compared to ARKit devices.
This does not apply to HoloLens devices.
Avoid placing 3D objects on plain colored surfaces and highly transparent or reflective objects (for example, an all-white desk). Instead, place the 3D object or objects on a surface with saliency, interesting features, and texture.
Are There Any Special Properties, Services, Events, or Actions?
To view a list of common widget properties, services, and events, see Common Widget Properties, Services, and Events.
The following tables list properties, services, and events that are specific to this widget.
X Coordinate
Location of the Spatial Target on the x-axis.
Z Coordinate
Location of the Spatial Target on the z-axis.
Is enabled when the camera recognizes the target.
Enable Pan Gesture
Enables the pan gesture to be used in the experience, and allows you to move the scene around.
Enable Rotate Gesture
Enables the rotate gesture to be used in the experience, and allows you to rotate the scene with two fingers.
Enable Scale Gesture
Enables the scale (zoom) gesture to be used in the experience, and allows you to change the size of the scene.
Reset Gesture Changes
Resets the scene to its original size and position after moving elements around with gestures (move, rotate, zoom).
Tracking Acquired
Triggered when the surface is recognized by the camera. Augmentations contain the target (ID) and any associated metadata.
Tracking Lost
Triggered when the camera no longer recognizes the surface. Augmentations contain the target (ID) and any associated metadata.
The Widget in Action
Here’s an example of what your widget might look like!
Minimum Steps Required for Use
What It Looks Like
1. Drag and drop a Spatial Target widget onto the canvas.
2. Drag and drop the widgets you want displayed in your experience. For this example, we’ve included a Model widget.
3. In the PROJECT pane, under Configuration > Experiences, select None from the ThingMark Association drop-down.
4. Once the experience is published, it will appear in your Library. Open the experience, and point the camera at a horizontal surface, then place the model by tapping the screen.