Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Input.mouseScrollDelta - what is it?

Discussion in 'Documentation' started by andyz, Jan 10, 2015.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,114
  2. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    E.g. the unit of the wheel delta?
     
  3. Summit_Peak

    Summit_Peak

    Joined:
    Nov 15, 2014
    Posts:
    3
    Code (CSharp):
    1.     public static float ScrollWheel { get { return Input.GetAxis("Mouse ScrollWheel"); } }
    2.     public static float ScrollWheel { get { return Input.mouseScrollDelta.y / 10; } }
    Both methods return the same value, but the second method is slightly more efficient.