A
ArtCode
Guest
Hello to everyone,
I'm making a little arcade game on Android and I want to implement a multi touch movement.
Something like Microtrip. Examle:
If I press the left side of the screen -> The player moves to the left
If I press the right side of the screen -> The player moves to the right
and this is OK!
The problem starts while I press the the screen when a finger is already pressing...
While I'm pressing the LEFT side and then I touch the RIGHT side the PLAYER just STOPS...
I want to give the priority to the LAST finger pressed... somehow to disable the touch used before.
Here is my code:
Player STEP EVENT
I'm making a little arcade game on Android and I want to implement a multi touch movement.
Something like Microtrip. Examle:
If I press the left side of the screen -> The player moves to the left
If I press the right side of the screen -> The player moves to the right
and this is OK!
The problem starts while I press the the screen when a finger is already pressing...
While I'm pressing the LEFT side and then I touch the RIGHT side the PLAYER just STOPS...
I want to give the priority to the LAST finger pressed... somehow to disable the touch used before.
Here is my code:
Player STEP EVENT
Code:
device_mouse_dbclick_enable(true);
if (point_distance(x, y, mouse_x, obj_Player.y) > 5) && (mouse_check_button(mb_left)) {
move_towards_point(mouse_x, obj_Player.y, 5);
if(mouse_check_button(mb_right)){
move_towards_point(mouse_x, obj_Player.y, 5);
}
}
else speed = 0;