Spawn AR Items
Follow this article to learn how to place objects into your AR World that can be viewed through the camera of your mobile phone. The objects you can place in the world include: 3D Unity assets, images, videos, audio.
Location AR lets you position your AR items at GPS locations in the real world. If available, Location AR objects will utilize real-world tracking (ARKit, ARCore, etc.), otherwise they will fall back to using GPS tracking.
To spawn Location AR items at a GPS location, use one of these Resources:
- Location AR Image to place an image in AR.
- Location AR Asset to place a 3D object in AR.
- Location AR Media to place a video in AR.
- Locative Audio to place locative sounds in AR.
Scene AR lets you position your AR items relative to the user (or another location). Scene AR does not rely on real-world locations, but instead relies on positioning relative to a center position (e.g. your user). Scene AR objects use real-world tracking if available (ARKit, ARCore, etc.), otherwise they fall back to using GPS tracking. Scene AR is useful for creating experiences that can be played anywhere and don’t require your player to be in a specific location. Once you have spawned an AR Item, see “Interact With AR Items” to learn how to script an experience for your player with this AR Item.
To spawn Scene AR items, use one of:
- AR Media to place audio or video in AR relative to the user.
- AR Object to place a 3D object in AR relative to the user.
Marker AR uses visual targets as anchors for placing your AR items. Motive utilizes frameworks like Vuforia to connect AR items to visual targets. This means that you can specify an image target to place any number of AR Items (images, videos, 3D objects) on top of or nearby the image target. Using Motive, you can update these AR objects through scripting based on any conditions or actions taken by your player. See this article for more information.
To spawn Marker AR items, use one of:
- Visual Marker Media to anchor a video or image to an image target.
- Visual Marker 3D Object to anchor a 3D object to an image target.
Interact With AR Items
An AR Task uses an existing AR Item as a focus for the player to interact with. This lets you use the power of Motive Tasks and Assignments with AR Items. A player can be asked to collect this AR Item, or to place something at this AR Item location in exchange for something. These tasks can also be extended to perform custom actions.
To utilize the power of AR Tasks, first you must populate the world with an AR Item using one of these resources: Location AR Image, Location AR Asset, Location AR Media, Visual Marker Media, or Visual Marker 3D Object. Next, in the same script you can include an AR Task resource. This AR Task will “target” the AR Item you created previously. This will force the user to go to that AR Item in order to interact with it and complete the Task. An AR Task with the action TAKE is very common for collecting items, and the Reward property is what the player will receive.
When viewing an AR item, you may want your player to have some additional information about the object, or some options on interacting with the object. Using Inspectors, you can show UI elements that only appear when your player is currently looking at the AR Object. These UI elements include buttons that can allow your player to make choices on what action to take. See the property “Responses” on Screen Message for more information.
You can use Object Effects to change the state of world objects. Currently the only effect supported by the Motive SDK is animation. Because of Unity’s powerful animation system, however, animation effects give you a huge amount of control over objects in your app.