Skip to content

Comments

improvement: no mouse acceleration#17

Open
WofWca wants to merge 1 commit intophoboslab:masterfrom
WofWca:patch-1
Open

improvement: no mouse acceleration#17
WofWca wants to merge 1 commit intophoboslab:masterfrom
WofWca:patch-1

Conversation

@WofWca
Copy link

@WofWca WofWca commented Dec 13, 2025

Utilize unadjustedMovement. For reference also see emscripten-core/emscripten#24602

I have not build the code but I checked that things still work by adding the following before the main eval() in dev tools:

const originalRequestPointerLock = HTMLElement.prototype.requestPointerLock;
HTMLElement.prototype.originalRequestPointerLock = originalRequestPointerLock;
HTMLElement.prototype.requestPointerLock = function() {
    this.originalRequestPointerLock({
        unadjustedMovement: true
    })
}

I have not checked whether the 13k limit is still upheld, and I don't know whether the new code obeys the code style of the project.

Utilize [`unadjustedMovement`](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestPointerLock#unadjustedmovement).
For reference also see emscripten-core/emscripten#24602

I have not build the code but I checked that things still work by adding the following before the main `eval()` in dev tools:

```javascript
const originalRequestPointerLock = HTMLElement.prototype.requestPointerLock;
HTMLElement.prototype.originalRequestPointerLock = originalRequestPointerLock;
HTMLElement.prototype.requestPointerLock = function() {
    this.originalRequestPointerLock({
        unadjustedMovement: true
    })
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant