Hi.
I want make a game (Space Invaders) for iPhone and need control spaceship with Crooked ِDevice (Tilt the phone) but I don't know how can do it.
Please Guide Me.
Thanks A Lot.
Vector v = getAccelerometer();
if(v.x>0.2) // moving right
{
x+=5;
}
else if(v.x<-0.2)
{
x-=5;
}
Users browsing this forum: No registered users and 1 guest