Page MenuHome

Mouse wrapping causes erratic movement
Confirmed, NormalPublic

Description

System Information
Operating system: Windows 10, 20H2
Graphics card: Nvidia GTX 1650

Blender Version
Broken: 2.91 - 2.93
Worked: 2.79 (That I know of)

Short description of error
I first noted this issue on https://blender.stackexchange.com/q/228330

Sometimes, when the cursor wraps around the screen, whatever I am editing will jump drastically in location, scale, etc. I was best able to capture this phenomenon with scaling a cube, but it happens for literally everything; it's not even limited to the 3D Viewport.

Note how the cube jumps in scale when the cursor wraps around the edge. That's not a bug in the gif; that's what actually happening.

I have encountered this issue on multiple computers with multiple mice. I first encountered it in Blender 2.91, but it is possible it has existed longer than that.

Exact steps for others to reproduce the error
Based on the default startup.

  1. Select the default cube
  2. Hit s for scale
  3. Drag mouse past screen border so it wraps around. Drag it back and forth a couple times and the size should jump.

Event Timeline

Nicholas Rishel (nicholas_rishel) changed the task status from Needs Triage to Confirmed.Jun 24 2021, 4:41 AM

Triaging notes: the source of this bug is that cursor wrap move the cursor, but when it later checks the mouse position it hasn't yet been updated, so it re-wraps. This behavior has always been preset but is variably likely to occur. I don't at this time have a hypothesis as to why the cursor position is sometimes not updated before the next mouse move message is processed (we use the current mouse position, not the position at the time of the Win32 event).

Ghost on Mac solves this by having a timeout before the cursor can wrap again (there is or was an open issue where the timeout presumably wasn't sufficient for ARM Mac).