I'm getting an error on desktop chrome that utils.device.checkHasPositionalTracking() is "not a function".
If it is obsolete, where can I find an updated list of utils.device
methods for device detection? The official documentation seems to be outdated and lists depreciated methods for device detection. The browser doesn't seem to recognize this one in particular at all.
let mobile = AFRAME.utils.device.isMobile ();
//// isOculusGo and isGearVR have been replaced with isMobileVR
//let gearVR = AFRAME.utils.device.isGearVR();
//let oculusGo = AFRAME.utils.device.isOculusGo();
let mobileVR = AFRAME.utils.device.isMobileVR
//let tracking = AFRAME.utils.device.checkHasPositionalTracking(); //not working
let headset =AFRAME.utils.device.checkHeadsetConnected();
if(mobile){
console.log("Viewer is mobile.");
}
if(mobileVR){
console.log("Viewer is MobileVR.");
}
/*if(tracking){
console.log("Viewer has positional tracking.");
}*/
if(headset){
console.log("Headset Connected.");
}
The previous code results in "Viewer is MobileVR" even though I'm testing on a desktop computer.