bevyengine / bevyengine/bevy

MouseMotion is absolute, not delta, in WSL2 & Linux VMs

Open
#9,590 0 comments 3 reactions 0 assignees View on GitHub
A-Input C-Bug O-Linux O-Windows
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

The MouseMotion delta is incorrect in WSL2 & Linux VMs. It returns the absolute coordinate of the cursor, instead of the delta.

Windows is fine, and the same Linux binary that has issues under WSL2, works fine on pure Linux.

It appears that this is a known upstream issue in winit, but it looks stale: [https://github.com/rust-windowing/winit/issues/946](https://github.com/rust-windowing/winit/issues/946).

## Bevy version

0.11.2

## Relevant system information

This problem is specific to WSL2 or Linux running in a VM. Pure Windows or Linux are fine.

## What you did

I have a have a bevy app that uses the mouse to move the camera. It works fine on Windows and in pure Linux. When using the same Linux binary under WSL2, the mouse controls fail.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing MouseMotion under WSL2 or a Linux VM, then compare its values with pure Linux and Windows. Read the linked upstream winit issue #946 to determine whether the problem is handled upstream; done means MouseMotion reports cursor deltas rather than absolute coordinates in the affected environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
game-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.