Minor changes to improve look of third person view.
#story[1312]
This commit is contained in:
@@ -77,14 +77,14 @@ public class View3D extends Pane {
|
||||
/**
|
||||
* Distance to switch from third person to bird's eye
|
||||
*/
|
||||
private final double THIRD_PERSON_LIMIT = 200;
|
||||
private final double THIRD_PERSON_LIMIT = 500;
|
||||
/**
|
||||
* Distance to stop zoom
|
||||
*/
|
||||
private final double ZOOM_IN_LIMIT = 30;
|
||||
private final double ZOOM_OUT_LIMIT = 700;
|
||||
private final double MAX_PITCH = 60; // birds eye view
|
||||
private final double MIN_PITCH = 10; // third person view
|
||||
private final double MIN_PITCH = 5; // third person view
|
||||
private final double ZOOM_PER_KEYPRESS = 5; // distance changed per zoom
|
||||
|
||||
/**
|
||||
@@ -289,8 +289,9 @@ public class View3D extends Pane {
|
||||
* between third person to birds eye view.
|
||||
*/
|
||||
private void adjustPitchForZoom(){
|
||||
double pitch = (((-distance.getZ() - ZOOM_IN_LIMIT) /
|
||||
((THIRD_PERSON_LIMIT - ZOOM_IN_LIMIT) / (MAX_PITCH - MIN_PITCH))) + MIN_PITCH);
|
||||
double pitch = (((-distance.getZ() - (ZOOM_IN_LIMIT*2)) /
|
||||
((THIRD_PERSON_LIMIT - (ZOOM_IN_LIMIT*2)) / (MAX_PITCH -
|
||||
MIN_PITCH))) + MIN_PITCH);
|
||||
|
||||
// if pitch is out of bounds, set it to the min/max
|
||||
if (pitch < MIN_PITCH) {
|
||||
|
||||
Reference in New Issue
Block a user