Hi,
I am having some unexpected results with touch controls and the iphone 5.
I've been using the code below to control my ships movement in a space shooter i'm making. The code works perfectly on the iphone4 and ipad but not on the iphone 5.
If I'm moving left ie: device_mouse_x(device)<=120, and i press the fire button, the ship sometimes stops moving. After some investigating, it turns out that a small portion in the bottom left corner of my iphone5 will register as a release event, even though my finger is still down. Only happens on iphone 5. Any ideas on what may be causing this error. I even tried virtual keys -same result.
Cheers
// in step event of ship
for(device=0; device<2; device+=1){
if device_mouse_check_button_released(device, mb_left){if device_mouse_x(device)>=420 {rapid=true}}//fire button released
if device_mouse_check_button(device, mb_left){
if device_mouse_x(device)>=420 {if(rapid=true){ event_perform(ev_keypress,vk_space)};rapid=false;}// fire button area down
if device_mouse_x(device)>=170 and device_mouse_x(device)<420 {x+=5;}//right move area down
if device_mouse_x(device)<=120 {x-=5;}}//left move area down
}
lordtez
Member Since 13 Nov 2003Offline Last Active Today, 10:36 AM



Find content
Not Telling
