Global and Node Touch and Mouse Events API

    Function NameReturn value typeMeaning
    getLocationVec2Get the mouse position, which contains the x and y properties.
    getLocationXNumberGet the mouse position on x-axis.
    getLocationYNumberGet the mouse position on y-axis.
    getPreviousLocationVec2Get the position of the last triggered mouse event, which contains the x and y properties.
    getDeltaVec2Get the distance the mouse has moved relative to the lower-left corner since the last event, which contains the x and y properties.
    getDeltaXNumberGet the x-axis distance the mouse has moved relative to the lower-left corner since the last event.
    getDeltaYNumberGet the y-axis distance the mouse has moved relative to the lower-left corner since the last event.

    Touch Events API

    API NameTypeMeaning
    touchTouchThe touch point related to the current event.
    getIDNumberGet the ID of the touch point, which is used for multi-touch logic.
    Function NameReturn value typeMeaning
    getUILocationVec2Get the current mouse position relative to the lower-left corner of the UI window, which contains the x and y properties.
    getUILocationXNumberGet the current mouse position on x-axis relative to the lower-left corner of the UI window.
    getUILocationYNumberGet the current mouse position on y-axis relative to the lower-left corner of the UI window.
    getUIStartLocationVec2Get the position of the initial touch point relative to the lower-left corner of the UI window, which contains the x and y properties.
    getUIPreviousLocationVec2Get the position of the last touch point relative to the lower-left corner of the UI window, which contains the x and y properties.
    getUIDeltaVec2Get the distance the mouse has moved relative to the lower-left corner of the UI window since the last event, which contains the x and y properties.