We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a805010 commit 6473655Copy full SHA for 6473655
common/webapp/src/js/controls/freeflight/FreeFlightControls.js
@@ -152,8 +152,16 @@ export class FreeFlightControls {
152
153
document.body.requestFullscreen()
154
.finally(() => {
155
+ // try with unadjustedMovement first and fall back without it if not supported
156
this.target.requestPointerLock({
157
unadjustedMovement: true
158
+ })
159
+ .catch(err => {
160
+ if (err.name === "NotSupportedError") {
161
+ return this.target.requestPointerLock();
162
+ } else {
163
+ throw err;
164
+ }
165
});
166
167
}
0 commit comments