Recovered stable rotation of the player's boat

- Uses AnimationTimer rather than listeners
- Reduced pre-start time to speed up testing

#story[1261]
This commit is contained in:
cbt24
2017-09-05 15:19:04 +12:00
parent c74cc26bf1
commit 3ecf203cba
4 changed files with 45 additions and 35 deletions
@@ -50,6 +50,8 @@ public class View3D extends Pane {
*/
private Rotate pitch;
private PerspectiveCamera camera;
/**
* Default constructor for View3D. Sets up Scene and PerspectiveCamera.
*/
@@ -86,6 +88,7 @@ public class View3D extends Pane {
pitch = new Rotate(0, Rotate.X_AXIS);
camera.getTransforms().addAll(pivot, yaw, pitch, distance);
this.camera = camera;
return camera;
}
@@ -142,4 +145,8 @@ public class View3D extends Pane {
public void setPitch(double pitch) {
this.pitch.setAngle(-pitch);
}
public PerspectiveCamera getCamera() {
return camera;
}
}