aframe
aframe copied to clipboard
Pointerlock erratic camera movements
High polling rate (>250Hz) mouse = jumpy camera movements with some platforms
- A-Frame Version: all
- Platform / Device: Windows + chromium-based browser
- Reproducible Code Snippet or URL:
Root cause is an OS bug: https://bugs.chromium.org/p/chromium/issues/detail?id=781182
Workaround we successfully implemented in our fork involves checking for outlier values in look-controls.js component
let x = evt.movementX || evt.mozMovementX || 0;
if (Math.abs(x) > window.innerWidth/3) {x = 0}
let y = evt.movementY || evt.mozMovementY || 0;
if (Math.abs(y) > window.innerHeight/3) {y = 0}