I’ve been working on this seemingly easy problem for a while and I’m stumped. I think I’ve narrowed it down to the following code (ran in a new project).
I’m trying to clamp the mouse delta but get different sensitivities in editor and build.
Works (no sensitivity change):
function Update () {
mouse = Input.GetAxisRaw("Mouse X");
transform.Translate(mouse,0,0);
}
I’m referring to “doesn’t work” as in build play mouse delta sensitivity is about 2 or 3 times higher than in editor play. As if there is a hidden multiplier. Can’t figure it out. I really need to clamp the mouse delta.
Sorry but I’m just not sure about any specific mouse sensitivity differences between the editor and the run-time, it “should” (operative word ) be the same as it’s the same player in use in both cases.
Perhaps someone else can chime in with their experiences here?
I have tried windows xp default mouse drivers (from logitech) and it didn’t help.
I also tried a web build and it fixed it.
Lowering the frame rate changed the mouse sensitivity in the build as long as it was lower than about 50. This is not a good work around, I think, because the slower the frame rate the slower the mouse when it is set to a constant speed. I don’t think that’s supposed to happen since Input.GetAxisRaw(“Mouse X”) is a frame rate independent value.
Yes I’ve been stuck here as well within FixedUpdate. I have a plane which rolls (AddTorque) based on Input.GetAxis(“Mouse X”). In the editor and web player I have it as desired, but once you use it in a build or web player full screen - everything is different.
The sensitivity suddenly becomes much less. I’ve tried with both multiplying with Time.deltaTime and without. It’s almost as though the delta suddenly changes when you’re in a build - though I don’t see how that can be the case.
All I know is I’ve done a test by adding or subtracting a float whenever the mouse x moves right or left. In the editor it’s fine, but once i’m in a build the increment is much less. Why is this? I’m using Time.deltaTime but the editor and build’s increment is drastically different.
I’m getting this exact same problem. It’s only with the mouse input, but it’s radically different between the editor and the standalone, the standalone is incredibly sluggish, maybe a quarter the speed I get in the editor.
Script is this :
Whether I multiply MouseX by time delta or not, the yaw/pitch is very different from the editor to the standalone.
It’s related to the window size. As I change window resolutions the mouse sensitivity is changing, the total angle of pitch I get from moving my mouse the entire (including the bits outside the game window) vertical distance of my monitor changes with game resolution.