Skip to content

Mouselook is stairsteppy and lopsided on Linux/X11 #19031

Description

@KeyboardDanni

Godot version:
3.0.2, from AUR

OS/device including version:
Arch Linux (rolling release)

Issue description:
On X11, Godot appears to be sampling whole pixel cursor coordinates when detecting mouse motion, and when centering the mouse, sets its position using integral coordinates. This places the cursor very close to the next top/left pixel in subspace coordinates, meaning that moving the mouse up or left causes the motion to drift, while extra effort is required when moving the mouse down or right. This results in very frustrating mouselook controls.

This affects any X11 input driver that uses subpixel coordinates. xf86-input-libinput (default on Arch Linux) and xf86-input-synaptics (used by trackpads) are affected. xf86-input-evdev (the older X11 input driver) is not affected.

Issue can be seen in the editor, as well as the 3D FPP Interaction Template found in the Project Manager.

I am told that there is a function that sets the X11 cursor position via subpixel coordinates, which should resolve the issue. Not all engines in Linux have this problem, but many do, and Godot is one of them.

Steps to reproduce:

  • Hold right mouse button in the 3D editor
  • Move mouse very slowly down and to the right - camera barely moves at all
  • Move mouse at the same speed up and to the left - camera drifts up-left

Minimal reproduction project:
3D FPP Interaction Template (from the Project Manager Templates tab)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions