Skip to content

Apply some smoothing to the SDL mouse events #6

@fwcd

Description

@fwcd

Currently, the game's mouse controls feel a bit stuttery when used from the GUI (the LUNA-based input works fine), likely because SDL provides us with a much higher frequency of mouse events, which would trigger the deadzone more often. One way to avoid this would e.g. be to apply a moving average or simply to throttle the mouse events to a lower frequency. We'd have to be a bit careful in the computation of relative positions, especially when the pointer is locked, since SDL's xrel and yrel seem to refer to the delta between individual events, we'd have to keep track of all such changes even if we decide not to emit ControllerMessages for each.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions