mojira.dev
MC-241951

Player momentum on X and Z axis are cancelled separately at low values

When the player gradually slows down after moving, the player's momentum eventually snaps down to zero when they are moving slowly enough. However, the speed is not checked as the magnitude of the XZ vector, the X motion and Z motion are considered separately. This results in the player appearing to hit an invisible wall when they slow down, especially at shallow angles relative to the X or Z axis.
To reproduce: Fly in creative mode or walk on blue ice. Point at a very shallow angle away from one of the cardinal directions and move forward. Look straight down and watch your cursor relative to the pixels of the blocks below. Stop moving and let yourself slow down. You will notice your momentum on the X or Z axis suddenly vanish, causing you to move perfectly aligned with the block grid!

Attached is an illustration of the path you might take if you slow to a stop after moving in various directions.

Linked issues

Attachments

Comments

PR0CESS
ampolive

Duplicate of or relates to MC-184530. It seems like the same issue to me, but it might not have the same root cause.

EchoBlade

Definitely relates to MC-184530, but there are some key differences.  This issue completely erases the player's momentum on one axis when that component of the motion vector is small, and only when the player isn't pressing the movement keys. MC-184530 slightly deflects the motion vector towards the closest axis, and while the movement keys are pressed.

pulpetti

In 1.19 Pre-2.

EchoBlade

Shugoh

Confirmed

Platform

Normal

Player

1.17.1, 1.18 Pre-release 4, 1.18 Pre-release 5, 1.18.1, 1.18.2, ..., 1.19.1 Pre-release 4, 23w51b, 1.21.1, 1.21.3, 1.21.4 Pre-Release 1

25w02a

Retrieved