I have this in the update() part of my xna game:
while (TouchPanel.IsGestureAvailable)
{
GestureSample gs = TouchPanel.ReadGesture();
switch (gs.GestureType)
{
case GestureType.Flick:
_GameMap.GameCamera.Translate(new Vector2(-gs.Delta.X/2, 0));
//moves the camera by this amount
break;
}
}
But unsurprisingly when i flick there is no scrolling (like google earth or angry birds), its just a start and end. How do I implement scrolling in a flick?
From Windows Phone 7 Game Development:
Flick gestures are triggered when the user releases contact with the screen (...) This tends to be useful for initiating kinetic scrolling, in which objects continue moving after is released in the direction that the user had been moving.
If kinetic scrolling as described here is what you want, then upon detecting the Flick gesture, save the Delta, and on every frame, move by that Delta (times some constant) and reduce it by a certain amount. This will cause the screen to move and slow down gradually.
If the text is to be taken literally, that gesture is only reported when the user releases contact, which means that during contact the page would not move. In this case, you will also need to look for a Drag gesture of some sort (probably FreeDrag) and start moving the screen during that drag.