User Tools

Site Tools


Using the Drag Recognizer

A drag is a continuous gesture where the finger(s) moves freely around the screen.


  • Movement Tolerance: minimum distance the finger(s) must move in order to begin the drag gesture
  • Apply Same Direction Constraint: for multi-fingers drag only - turn it on to fail the gesture the fingers are not moving in the same direction


void OnDrag( DragGesture gesture ) 
    // current gesture phase (Started/Updated/Ended)
    ContinuousGesturePhase phase = gesture.Phase;
    // Drag/displacement since last frame
    Vector2 deltaMove = gesture.DeltaMove;
    // Total drag motion from initial to current position
    Vector2 totalMove = gesture.TotalMove;
manual/gestures/drag.txt · Last modified: 2013/03/11 20:12 by wravaine