- Fixed bug where if you set minDistance that is higher than the current distance, the camera view would still remain at the old distance.

- Same as above but for maxDistance.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9680 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
dan..om 12 years ago
parent c842eefb90
commit 133bd21ab9
  1. 6
      engine/src/core/com/jme3/input/ChaseCamera.java

@ -505,6 +505,9 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control {
*/ */
public void setMaxDistance(float maxDistance) { public void setMaxDistance(float maxDistance) {
this.maxDistance = maxDistance; this.maxDistance = maxDistance;
if (maxDistance < distance) {
zoomCamera(maxDistance - distance);
}
} }
/** /**
@ -521,6 +524,9 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control {
*/ */
public void setMinDistance(float minDistance) { public void setMinDistance(float minDistance) {
this.minDistance = minDistance; this.minDistance = minDistance;
if (minDistance > distance) {
zoomCamera(distance - minDistance);
}
} }
/** /**

Loading…
Cancel
Save