I have created two active objects, a left and right button which I am using the multi touch object to test if one of these buttons is pressed and if one is pressed then the player is moved in the required direction.
My game logic is as follows....
1. A new touch on right button has started....move player right
2. A new touch on left button has started....move player left
I also added the following in case the buttons are held down....
3. Touch 0 is active on right button....move player right
4. Touch 0 is active on left button....move player left
This works but has an undesirable quirk, if you hold down one button but then press the other button before releasing the one already in use the direction will not change and the player just continually scrolls in the unchanged direction.
I think it's because of the touch 0 events, I am guessing that the second keypress becomes touch 1, is there a way to make it so only the most recently selected touch is acted on, so that only one of the onscreen buttons can be touched?