|
@@ -67,7 +67,7 @@ module BABYLON {
|
|
if (this.webVROptions.displayName) {
|
|
if (this.webVROptions.displayName) {
|
|
devices.some(device => {
|
|
devices.some(device => {
|
|
if (device.displayName === this.webVROptions.displayName) {
|
|
if (device.displayName === this.webVROptions.displayName) {
|
|
- this.getEngine().enableVR(device);
|
|
|
|
|
|
+ this._vrDevice = device;
|
|
return true;
|
|
return true;
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
@@ -75,8 +75,11 @@ module BABYLON {
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
//choose the first one
|
|
//choose the first one
|
|
- this.getEngine().enableVR(devices[0]);
|
|
|
|
|
|
+ this._vrDevice = devices[0];
|
|
}
|
|
}
|
|
|
|
+ this.getEngine().enableVR(this._vrDevice)
|
|
|
|
+ } else {
|
|
|
|
+ Tools.Error("No WebVR devices found!");
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|