How to use mouseWheel & mouseWheelDelta? I’ve tried something but i can’t understand how it works?
I’ve a variable “X” and i want to increase and decrease it by mouse wheel control, how to do this?
How to use mouseWheel & mouseWheelDelta? I’ve tried something but i can’t understand how it works?
I’ve a variable “X” and i want to increase and decrease it by mouse wheel control, how to do this?
mouseWheel is true if the wheel was scrolled this frame. mouseWheelDelta is the number of lines that were scrolled.
So you could do this:
if (Input.mouseWheel)
{
x += Input.mouseWheelDelta;
}
I believe if the wheel wasn’t scrolled than the delta will simply be 0, so this might work the same way:
x += Input.mouseWheelDelta;
Ah thanks, got it now.
I was thought it like: Input.mouseWheelTurning
But it is just a: Input.mouseWheelTurned
Thanks again.