Augmented reality

Howdy!

AR is supported. But not all AR features. At the moment, you can enter an immersive-ar session and present elements. There are a few limitations to the current implementation, which will change soon:

  1. Pointer down and up is not triggered. So you cannot click buttons ATM.
  2. Plane detection and anchors are not yet supported.

So what you have is your estimated height. The Y axis is your device’s height, and 0 should be the floor (if your device detected it correctly).

To enable AR (working on a simpler implementation for that) use this code:

var xr = await scene.createDefaultXRExperienceAsync({/* options, if you want */})
    // default is vr, change to ar
    xr.enterExitUI["_buttons"][0].sessionMode = "immersive-ar";

This will work in any ar-enabled browser.

A small tip - make sure there is no environment set :slight_smile:

I will soon start working on fully implementing the AR specs so you can interact with the entire scene.