On Android, this works as it should (tilt the device to make the ball roll accordingly with a speed relative to the degree of tilting)
if global.myDevice=os_android
{
//MOVE BY TILT
//X-AXIS
if (device_get_tilt_x()>0.1)
{
moveX=device_get_tilt_x()
if hspeed>-global.maxspeedX
{
hspeed-=moveX
}
myDir=1
}
else
{
if (device_get_tilt_x()<0.1)
{
moveX=device_get_tilt_x()
if hspeed<global.maxspeedX
{
hspeed+=-moveX
}
}
}
//Y-AXIS
if (device_get_tilt_y()<0.1)
{
moveY=device_get_tilt_y()
if vspeed<global.maxspeedY
{
if !position_meeting(x,y-radius,objLetterBallLowA)
{
vspeed+=moveY
}
else
{
vspeed=-vspeed/4
}
}
myDir=1
}
else
{
if (device_get_tilt_y()>0.1)
{
moveY=device_get_tilt_y()
if vspeed<global.maxspeedY
{
vspeed+=moveY
}
}
}
}
However, on iOS, it seems to be completely inversed. So left is right, right is left, down is up and up is down.
I've tried for quite some time now inversing this, but it seems my logic is failing me. Can any of you see this a bit more clear?











