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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user