Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
AndreiPrystupchyk / SwipeInput.cs
Created Feb 18, 2021 — forked from Fonserbc/SwipeInput.cs
A simple swipe detector for touchscreens for Unity3D. Four cardinal directions.
View SwipeInput.cs
using UnityEngine;
public class SwipeInput : MonoBehaviour {
public const float MAX_SWIPE_TIME = 1f;
public const float MIN_SWIPE_DISTANCE = 0.17f;
public static bool swipedRight = false;
public static bool swipedLeft = false;