- Home /
Scroll wheel axis not resetting to 0
All I want is to increment a variable on the same frame as a scroll wheel movement. However, once I move the scroll wheel, Input.GetAxis("Mouse ScrollWheel") remains locked at either .1 or -1. In other words, it's acting like a latch, not a delta.
.
I've tried applying gravity in input manager, I've tried using Input.GetAxisRaw, I've tried Input.mouseScrollDelta, and I've tried using Input.ResetInputAxes either immediately after the increment or in LateUpdate. Same result every time. I know ResetInputAxes does something because if I put it before the increment it stops incrementing.
.
There's another thing too. I have Debug.Log(Input.GetAxis("Mouse ScrollWheel")) in the Update() function, but the log only updates sometimes. I'll scroll one way and have it display -.1, then scroll the other way and nothing happens. If I continue to scroll the other way it eventually changes to .1, but when it does so seems random. You'd think my mouse wheel is just broken, but it works fine everywhere but here.
" but it works fine everywhere but here. "
What do you mean by that?
Your answer
Follow this Question
Related Questions
is possible mouse wheel key in else than GetAxis? 2 Answers
Changing GUI Texture with mousewheel? 1 Answer
Shift + ScrollWheel 1 Answer
Mouse Scrollwheel not detected in launcher 0 Answers
Mouse ScrollWheel Loop 1 Answer