public GameObject player;
public void OnBeginDrag(PointerEventData eventData)
{
Vector2 delta = eventData.delta;
// Vector2 delta = Input.GetTouch(0).deltaPosition;
if (Mathf.Abs(delta.y) > Mathf.Abs(delta.x))
{
if (delta.x > 0) player.transform.Translate(0, 3.00f , 0);
else player.transform.Translate(0, -3.00f , 0 ) ;
}
}
public void OnDrag(PointerEventData eventData)
{
}