Touchpad - Swipe
Swipe Up/ Down/ Left/ Right
In order to enable the below APIs, you must add JMRInteraction Script to a GameObject in your scene.
Returns true during the frame the user performs swipe using the trackpad. You need to call this function from the Update function since the state gets reset for each frame. It will not return true until the user releases this key and swipes the trackpad again.
Swipe Up
bool JMRInteraction.GetSwipeUp(out float val);
Returns true if swiped up, also returns swipe up value.
Swipe Down
bool JMRInteraction.GetSwipeDown();
Returns true if swiped down, also returns swipe down value.
Swipe Left
bool JMRInteraction.GetSwipeLeft();
Returns true if swiped left, also returns swipe left value.
Swipe Right
bool JMRInteraction.GetSwipeRight();
Returns true if swiped right, also returns swipe right value.
Last updated