Add AR Items to GPS Locations

Contents:

Populating the Location-AR World

The simplest way to add an AR item to a GPS location is to use one of the “Location AR” resources:

  • Location AR Asset – add a 3D model or other asset at a location
  • Location AR Image – add an image to a location
  • Location AR Media – add media (video, sound, image) to a location. (Note that using Location AR Media to add an image to a location behaves the same as Location AR Image.)

Read more about how to create and use GPS locations in Motive.

Read more about using Unity Asset Bundles to add 3D models to your app.

All of the Location AR items support these configurable properties:

  • Always face viewer – if true, the item always is always faced towards the user.
  • Distance variation – describes how the apparent distance of the object changes relative to the user. There are two options:
    • Linear variation – the item behaves “naturally” and gets bigger when you get near it, smaller when you move away. This feature works best on devices that are able to do AR tracking (such as those that support AR Kit or AR Core). You can configure these sub-options:
      • Range – this can set the maximum and minimum distances for the item. For example, if you set min=1, max=10, the item will never appear closer than 1m and never farther away than 10m.
      • Distance scale – defines how to scale the item with distance. A distance scale of 0.5 would treat 1m as 0.5m, 10m as 5m and so on.
    • Fixed distance – the item will always be visible at a fixed distance from the user
  • Visible range – If this is set, the item is only visible when the user is within the specified range of the item.

Interacting with Location-AR Items

Using AR Task

Once an AR item is placed, you can direct the user to interact with it using an AR Task. By default AR Tasks support the following actions:

  • take – take something from the AR item (works well if the AR item represents a character or an object that dispenses items)
  • put – give something to an AR item (only if they have it in their inventory)
  • exchange – combines a take & put
  • confirm – simply tap the item (i.e. confirm that you saw it)
  • in_range – get within the Action Range of the item
  • track – find the item in AR mode

Read more about Tasks and Assignments.

Using Motive Events

You can use Motive Script Events to listen for event emitted by AR items:

  • select – the user has tapped the item
  • gaze – the item is in the center of the camera

Related