Skip to content

World Tracking

World Tracking has an advanced understanding of the user’s environment and thus requires an initialisation phase before users can track 3D content to their chosen point. With this tracking type, you could build a 3D model viewer that lets users walk around to view the model from different angles.

If you do not require a complex understanding of the user’s environment and desire users to place content without this initialisation phase, we’d recommend using Instant World Tracking.

To create a World Tracking experience, you may customize a ready-made Project Template or add a WorldTracker component to an existing project.

Customizing a template

When you open Mattercraft, you will be presented with a few Project Templates to help you get started.

Upon selecting a World Tracking template, your .zcomp will display a project which includes a WorldTracker component; as well as some simple content and basic behaviors.

You may customize any Mattercraft template like an ordinary Mattercraft project.

To learn more about getting started with Mattercraft’s templates, check out our dedicated Project Templates documentation.

Adding to an existing project

To add World Tracking to an existing project, you will first need to install a beta version of the Augmented Reality by Zappar package from the dependencies browser if you have not already.

Installing a beta dependency for World Tracking

You can then add the WorldTracker to your .zcomp by using the following instructions:

  1. Click on the + (plus) icon in the Hierarchy (or right click on a Group Node)
  2. Find the AR component category and from here, select WorldTracker

To use World Tracking properly, you must also add (or replace any existing camera you have in your .zcomp with) a ZapparCamera component. Learn more about this on our dedicated Zappar Camera article.

The WorldTracker has the following specific properties:

PropertyDescription
Initializing Layer ClipA layer clip that will be played when the world tracker is initializing; such as an animation to show the user must move their device to analyze the environment.
Initialized Layer ClipA layer clip that will be played when initialization is complete and the WorldTracker is providing a valid ‘ground’ anchor.
Quality Good Layer ClipA layer clip that will be played when the tracking quality of the WorldTracker is ‘good’. In other words, there is a clear position and freedom in 3D space.
Quality Orientation Only Layer ClipA layer clip that will be played when the tracking quality of the WorldTracker has reduced to ‘orientation only’. In other words, it is tracking rotation only and not position in 3D space.

World Trackers contain a GroundAnchorGroup component which is used to understand and track content to a surface in your environment.

The GroundAnchorGroup has the following specific properties:

PropertyDescription
Anchor IDThe identifier for a particular Anchor Group.
Show Preview At Design TimeShow or hide the reference in the 3D Viewport.

Ground anchors should contain a World Placement Group for the best user experience. The position of content placed in this group can be chosen by the user.

The WorldPlacementGroup has the following specific properties:

PropertyDescription
Is PlacingWhen true at runtime, the position of the contents of this component will be reset every frame to a point directly in front of the camera.
Normalize ScaleBy default, with this parameter false the scale of the contents of this component is that of the parent component. If set to true, this component will adjust the scale based on the height of the camera above the origin.
Face CameraWhile placing, the group will be rotated so the positive z axis points towards the camera.

When your World Tracker is in the Hierarchy, you can start adding tracked content by placing components inside of the tracker’s WorldPlacementGroup.

After understanding the basics of World Tracking, you can learn more about this tracking type by exploring the following articles: