PointerLock unadjustedMovement

hello,

It will be cool to remove the mouse acceleration by default for WEBGL or to make it as option.

function requestPointerLockWithUnadjustedMovement() {
  const promise = myTargetElement.requestPointerLock({
    unadjustedMovement: true,
  });

  if (!promise) {
    console.log("disabling mouse acceleration is not supported");
    return;
  }

  return promise
    .then(() => console.log("pointer is locked"))
    .catch((error) => {
      if (error.name === "NotSupportedError") {
        // Some platforms may not support unadjusted movement.
        // You can request again a regular pointer lock.
        return myTargetElement.requestPointerLock();
      }
    });
}

Thank you

2 Likes

+1, it would be great to have support for this

In the meantime you can try the solution from my comment on another thread here:

@unityruba @brendanduncan_u3d

It’s possible for you to send this to the correct user?

Thank you.