Answers for "get mouse scroll wheel unity"

C#
4

unity mouse wheel

Input.mouseScrollDelta.y //Return 1 when up and -1 when down and 0 when the mouse scroll is not rotated
Posted by: Guest on November-15-2020
0

unity mouse wheel

float z = zoom.ReadValue<float>();
if (z > 0)
    Debug.Log("Scroll UP");
else if (z < 0)
    Debug.Log("Scroll DOWN");
Posted by: Guest on March-15-2022

C# Answers by Framework

Browse Popular Code Answers by Language