- Home /
GetAxis("Mouse X") - suddenly faster in build
Hi
I have a problem with Input.GetAxis("Mouse X")
It has normal and consistend speed in the editor.
In the build game everything runs faster of course but the GetAxis is frame-rate independent so the speed is fine at first.
But suddenly after I used my mouse several times to turn the character with the GetAxis it switches to higher speed. Little mouse movements are very rapid character turns from then on. It stickt so that. The Y-axis is then faster too. This "suddenly faster-problem" happens only in the built game.
How do I have to use Input.GetAxis correctly? Is anything loading in the background and when finished I get higher GetAxis values? Every other time-depending movements are correct.
I don't use Time.deltaTime in combination with Input.GetAxis("$$anonymous$$ouse X").
I only use Time.deltaTime with the other movements and counters :)
I converted your answer to a comment. Next time please use the comments next time to reply to someone. Answers should only be used to answer the main question.
post your code.
no nothing is loading that would slow mouse.
float takeValue = Input.GetAxis("$$anonymous$$ouse X");
transform.Rotate(0,takeValue,0);
It's a simple script that turns the character with the mouse in the update.
sorry to necro, but did you ever find a solution to this problem? I'm getting the same thing.
Answer by Eric5h5 · May 19, 2013 at 04:04 AM
I suspect you're using Time.deltaTime with mouse movement, which is the opposite of what you actually want to do, since mouse movement is already framerate-independent to begin with. So using Time.deltaTime makes it vary depending on the framerate.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Mouse look Y axis sensitivity doesn't change 0 Answers
Audio to play with mouse axis. 0 Answers
How do I drag an object without Y transformation? 2 Answers
Mouse look and character model? 1 Answer