TBOrbit.OnDrag C# (CSharp) Method

OnDrag() public method

public OnDrag ( DragGesture gesture ) : void
gesture DragGesture
return void
    void OnDrag( DragGesture gesture )
    {
        // dont apply drag rotation if more than one touch is on the screen
        //if( FingerGestures.Touches.Count > 1 )
        //    return;
        
        // wait for drag cooldown timer to wear off
        //  used to avoid dragging right after a pinch or pan, when lifting off one finger but the other one is still on screen
        if( Time.time < nextDragTime )
            return;

        if( target )
        {
            IdealYaw += gesture.DeltaMove.x * yawSensitivity * 0.02f;
            IdealPitch -= gesture.DeltaMove.y * pitchSensitivity * 0.02f;
        }
    }