- 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
This commit is contained in:
parent
c842eefb90
commit
133bd21ab9
@ -505,6 +505,9 @@ public class ChaseCamera implements ActionListener, AnalogListener, Control {
|
||||
*/
|
||||
public void setMaxDistance(float 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) {
|
||||
this.minDistance = minDistance;
|
||||
if (minDistance > distance) {
|
||||
zoomCamera(distance - minDistance);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user