Directions being down/backward, left, right nad forward/up... The original function supplied by the port of nehe tutorials on lesson 10 uses the analog stick, so ive looked there many times... Ive tried this approach, but it just goes everywhere with the slightest tap on the stick:
Code: Select all
void joystickMoved (unsigned int buttonMask, int x, int y, int z)
{
if (abs(x) > 200) // dead zone LEFT <------------
{
variablex--;
}
if (abs(y) > 200) // dead zone UP +++++++++++++++
{
variabley--;
}
if (abs(x) < 55) // dead zone RIGHT ------------->
{
variablex++;
}
if (abs(y) < 55) // dead zone DOWN _______________
{
variabley++;
}
}
Thanks!