Mouse wheel scroll deltas are detected as 0.5 instead of 1.0

When scrolling in or out with an incremental scroll wheel, the UserInputService detects the wheel delta as -0.5 or 0.5 instead of -1 or 1 as it used to.

Reproduction Steps
This piece of code in a LocalScript demonstrates the bug:

game:GetService("UserInputService").InputChanged:Connect(function(input, gameProcessed)
	if input.UserInputType == Enum.UserInputType.MouseWheel then
		print(input.Position.Z)
	end
end)

This impacts games that check if input.Position.Z == 1 or -1 to detect a scroll in or out.

Expected Behavior
The Z value of the scroll input should always be -1, 0, or 1 when using a mouse wheel with increments to scroll.

Actual Behavior
The Z value returns -0.5 or 0.5 instead of -1 or 1. This behavior changed recently. If you scroll fast enough, you can still get increments of 1 to appear.

Issue Area: Engine
Issue Type: Other
Impact: Low
Frequency: Often
Date First Experienced: 2022-01-05 00:01:00 (-06:00)
Date Last Experienced: 2022-01-15 00:01:00 (-06:00)

1 Like

Can repro. The documentation states:

For the mouse wheel input, the z component [of InputObject.Position] describes whether the wheel was moved forward (1), backwards (-1), or not at all (0).

, while it actually ranges from -0.5 to 0.5.

I don’t know about you but I think this has been like this for a while now.

Thanks for the report! I have filed an internal ticket .

1 Like

This issue should be fixed now, thanks!

1 Like