I have a user interface that I was working on which uses handtracking. Now I don’t have an AR device, but am trying to at least structure the code as to not use actual hand meshes when it is an AR device. Now just seems like the time to do it.
First, I actually need to specify a uiOptions
property of the options passed to the experience. Fine so far, but when I look at this doc, at the top it shows immersive-vr
, while at the bottom it shows ar-immersive
. It seems very unlikely that this inconsistent format or this code should work (ar already holds the result of a check):
// when both AR & VR capable; AR wins; must have some capability or would not be here
const options = {
uiOptions: {sessionMode: ar ? 'ar-immersive' : 'immersive-vr'},
floorMeshes: [floor],
timeToTeleport: 3000
};
BABYLON.WebXRDefaultExperience.CreateAsync(scene, options).then(...)
Seems pretty minor (unless you actually such a device), but thought I would double check. The immersive-vr
format works, so I am guessing the ar one is backwards?