UserInputService: Inconsistent Mouse Deltas

The Icky-Nasty-Bug: [size=1]ooooo squish em[/size]
The Delta property on input objects seems to be reading different magnitudes between studio and game causing major inconsistencies between studio and game. It doesn’t seem to be an issue with how quickly InputChanged fires because the issue persisted outside of adjusting the camera inside the InputChanged event.

Repro Steps:
[ul]
[li]insert the code in the CODE spoiler below into a local script[/li]
[li]place local script in startergui[/li]
[li]press play / test solo / start server → start player and take note of camera speed[/li]
[li]publish the place to a game and play it, observe a much faster camera speed[/li]
[/ul]

local uis = game:GetService("UserInputService")
local camera = workspace.CurrentCamera

local position = Vector3.new(0, 20, 0)
local angleX, angleY, angleZ = 0, 0, 0

local CAMERA_MAX_ANGLE_UP   = math.rad(80)
local CAMERA_MIN_ANGLE_DOWN = math.rad(-80)
	
uis.MouseBehavior = "LockCenter"

uis.InputChanged:connect(function(object)
	angleX = angleX + math.rad(object.Delta.Y)
	angleY = angleY + math.rad(object.Delta.X)
	
	angleX = math.max(math.min(angleX, CAMERA_MAX_ANGLE_UP), CAMERA_MIN_ANGLE_DOWN)
	
	camera.CameraType = "Scriptable"
	camera.CoordinateFrame = CFrame.new(position) * CFrame.Angles(0, -angleY, 0) * CFrame.Angles(-angleX, 0, angleZ)
end)

Note:
The people I have asked to test this (including myself) have reported a roughly 2 times boost in speed from the speed they get in studio. They confirmed there was no DPI changing during that transition from studio to game. The people who tested were using a windows computer.

I’ve posted about this months ago (alongside two other bugs which have yet to be fixed), and it still hasn’t been fixed nor has there been any word of it being known about. It would be great to have some information returned back this time for this specific bug.

Yeah I noticed this when using it last week. I always thought it had to do with studio having a smaller window but you said that’s wrong.

Honestly it’s not the biggest deal to me, but I’d still like it fixed.

I’m pretty sure this is due to using a hardware mouse in studio vs a software mouse in the client. We want to move to a hardware mouse in the client, so this won’t be an issue in the future.

1 Like

Awesome news. Is there an ETA on that change or is it just wishful thinking for the time being?

Currently wishful thinking, BUT it is something that has to happen as we improve quality.

Did this happen or?

It has! mouse deltas seem to be working really well.

1 Like