@Override public void keyReleased(KeyEvent e) { switch (e.getKeyCode()) { case 37: cameraSpeed.x = 0; break; case 38: cameraSpeed.y = 0; break; case 39: cameraSpeed.x = 0; break; case 40: cameraSpeed.y = 0; break; case 16: cameraSpeed.z = 0; break; case 17: cameraSpeed.z = 0; break; } }
@Override public void keyPressed(KeyEvent e) { switch (e.getKeyCode()) { case 37: // right cameraSpeed.x = -scrollSpeed; break; case 38: // down cameraSpeed.y = -scrollSpeed; break; case 39: // left cameraSpeed.x = scrollSpeed; break; case 40: // up cameraSpeed.y = scrollSpeed; break; case 16: // in (RShift) cameraSpeed.z = -scrollSpeed; break; case 17: // out (LShift) cameraSpeed.z = scrollSpeed; break; } }