public void keyPressed() { if (key == '-') { sceneZoom -= sceneStep; } if (key == '+') { sceneZoom += sceneStep; } if (key == ' ' || key == 'q') { System.out.println("SAFE!!!"); controlGroup.safeDrone(); markerControlled.setInAir(false); } if (key == 's') { controlGroup.stop(); } if (key == 't') { controlGroup.takeOff(); markerControlled.setInAir(true); } }
public void draw() { background(0); lights(); if (commandsRight != null) commandsRight.display(); if (videoRight != null) videoRight.display(); if (commandsLeft != null) commandsLeft.display(); if (videoLeft != null) videoLeft.display(); if (markerControlled != null) markerControlled.display(); translate(width / 2, height / 2, sceneZoom); rotateX(sceneRotX); rotateY(sceneRotY); rotateZ(sceneRotZ); if (controller != null) controller.display(); }