if(Keyboard.isKeyDown(Keyboard.KEY_UP) || Keyboard.isKeyDown(Keyboard.KEY_W)) { position.x += (float) Math.sin(angleYaw * DEGREE_TO_RADIAN) * distance; position.z -= (float) Math.cos(angleYaw * DEGREE_TO_RADIAN) * distance; } if(Keyboard.isKeyDown(Keyboard.KEY_DOWN) || Keyboard.isKeyDown(Keyboard.KEY_S)) { position.x -= (float) Math.sin(angleYaw * DEGREE_TO_RADIAN) * distance; position.z += (float) Math.cos(angleYaw * DEGREE_TO_RADIAN) * distance; } if(Keyboard.isKeyDown(Keyboard.KEY_A)) { position.x -= (float) Math.cos(angleYaw * DEGREE_TO_RADIAN) * distance; position.z -= (float) Math.sin(angleYaw * DEGREE_TO_RADIAN) * distance; } if(Keyboard.isKeyDown(Keyboard.KEY_D)) { position.x += (float) Math.cos(angleYaw * DEGREE_TO_RADIAN) * distance; position.z += (float) Math.sin(angleYaw * DEGREE_TO_RADIAN) * distance; }