Hi all,
I have a movement system which moves the player ship across the map, what it is supposed to do is allow smooth movement using WASD, but it only works for S and A right now. I have no clue why it is doing this.
if (keyboardInputs.keyRight.isDown) {
gameWorld.player.setAccelerationX(100);
} else {
gameWorld.player.setAccelerationX(0);
}
if (keyboardInputs.keyLeft.isDown) {
gameWorld.player.setAccelerationX(-100);
} else {
gameWorld.player.setAccelerationX(0);
}
if (keyboardInputs.keyUp.isDown) {
gameWorld.player.setAccelerationY(-100);
} else {
gameWorld.player.setAccelerationY(0);
}
if (keyboardInputs.keyDown.isDown) {
gameWorld.player.setAccelerationY(100);
} else {
gameWorld.player.setAccelerationY(0);
}