Talk:Basic Tutorial 5        

Movement not working as advertised

For an example, press forward key (W), then backwards(S) without letting go of W. You'll start moving forwards, then backwards when you press S. Now let go of one of the keys and you'll stop moving. This shouldn't be the case as the other key is still held down!

To correct this, in keyPressed, change the code to:

 case OIS::KC_UP:
 case OIS::KC_W:
    mDirection.z += -mMove;
    break;

and similar for the other keys.

In keyReleased the code should then be:

 case OIS::KC_UP:
 case OIS::KC_W:
    mDirection.z += mMove;
    break;

again similar for the other keys.