About this guide

Understand absolute coordinates, relative mouse movement, USB HID, RawInput and why multi-gun routing can fail.

4. Absolute versus relative input, and USB HID

An aiming gun naturally produces an absolute screen location: wherever it is pointed now, independently of its previous report. A desktop mouse usually produces relative deltas: how far it moved since the previous report. USB HID report descriptors explicitly mark fields Absolute or Relative; the HID specification describes relative as change from the last report and absolute as based on a fixed origin.[1]

MAME makes the same distinction: absolute axes are normalized positions, while relative axes report movement since the preceding update.[2] Treating an absolute gun as a relative mouse can cause acceleration, edge pinning, shared-cursor interference or drift. Treating relative deltas as absolute coordinates collapses aim around the origin.

“USB” does not itself guarantee a lightgun API. A modern gun may expose one or more HID interfaces—absolute pointer/tablet-like axes, mouse emulation, joystick/gamepad axes, buttons—or a vendor protocol plus driver. AimTrak, for example, exposes multiple mouse-emulation and joystick interfaces on Linux and requires selection of the correct one.[3][4] Emulator input providers must preserve device identity, absolute axes and per-player routing.

Sources