I am making a space shooter game where a player will control a ship by moving his finger anywhere on the screen. Basically I want to make controls exactly like in Chicken Invaders. At first I tried to use InputAdapter. http://pastebin.com/APh6a5PC
This worked but only when I was using one finger. If I put finger1 to the screen and drag, then put finger2 while dragging finger1 and then releasing finger1, the screen does not pick up that finger2 jsut became finger1 and proceed as if nothing happened. (Sorry I am bad at explaining).
I also tried GestureListener but it if I drag finger1 and put finger2, the whole input does not work until I release one of the fingers.
@Override
public boolean pan(float x, float y, float deltaX, float deltaY) {
Vector2 position = player.b2body.getPosition();
position.add(deltaX, ((viewport.getWorldHeight() - deltaY) - viewport.getWorldHeight()));
player.b2body.setTransform(position, 0);
return true;
}
What is the proper way of configuring input for this type of game?