MonoGame / MonoGame

One framework for creating powerful cross-platform games.
http://www.monogame.net
Other
11.32k stars 2.9k forks source link

Monogame on iOS: different behavior when interpreting touches compared to Windows Phone #298

Closed Krumelur closed 12 years ago

Krumelur commented 12 years ago

Just to do some tests I have exeuted Microsofts XNA sample "Shooter" on Windows 7, Windows Phone 7 and iPhone (using Monogame).

Besides the fact the Monogame runs the game in portrait instead of landscape, I have noticed that the movement of the player sprite behaves really different.

On Phone 7, you tap anywhere, keep your finger on the screen and while moving it, the sprite follows the movement relative to the finger.

On iPhone however, the sprite first doesn't move at all, then moves extremely fast and moves up to the screens bounds. This makes the player uncontrollable.

The code used is:

while ( TouchPanel.IsGestureAvailable ) { GestureSample gesture = TouchPanel.ReadGesture(); if ( gesture.GestureType == GestureType.FreeDrag ) { player.Position += gesture.Delta; } }

Does that have to be different for iOS?

ghost commented 12 years ago

Hey Krumelur, I think pull request #348 repaired this issue, so I'm going to close it. Please let me know if additional repair is needed.