OK. Then the question becomes, where do I call it?
I tried calling it from onExitingVRObservable and onExitingVR
vrHelper.onExitingVRObservable.add(() => {
setTimeout(() => {
canvas.requestPointerLock();
}, 1000);
});
but neither worked (I added the timeout because I thought it might be the same issue as Virtual Reality bugs when I enable Interactions on Microsoft Edge+Safari).
I can invoke pointer lock elsewhere, however e.g.
scene.onKeyboardObservable.add((kbInfo) => {
switch (kbInfo.type) {
case BABYLON.KeyboardEventTypes.KEYUP:
canvas.requestPointerLock();
break;
}
});
TIA