w3c / pointerlock

Pointer Lock
https://w3c.github.io/pointerlock/
Other
18 stars 16 forks source link

Provide more information about movementX/Y for unadjusted movements #98

Open ollop opened 1 month ago

ollop commented 1 month ago

When using requestPointerLock({unadjustedMovement: true}) PointerEvent is expected to provide "raw" movementX/movementY information. At least to me, it is unclear what these "raw" values represent. At the moment if movementX == 10 on one computer I have no idea if this is the same as movementX == 10 on another or how to interpret it.

I expect that "raw" movementX/movementY are related to the DPI of the used physical pointing device. In any way, the nature of movementX/movementY with "unadjustedMovement: true" should be specified. If movementX/movementY with "unadjustedMovement: true" are related to the input device's DPI, the DPI of the input device should be provided through API.

reillyeon commented 1 month ago

It would make the most sense to me (and probably be of most use to the developer) for unadjusted movement to be expressed in screen coordinates, the same way the adjusted movement values are. Essentially, unadjusted movement tells you how far across the screen the mouse cursor would move without acceleration applied.