mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:48:44 +02:00
Set a max focus distance value of 14km to not lose the edit handles by far-clipping
This commit is contained in:
parent
079b276c2b
commit
925cfc9b23
1 changed files with 1 additions and 9 deletions
|
@ -28,7 +28,7 @@ var FOCUS_MIN_ZOOM = 0.5;
|
||||||
var ZOOM_SCALING = 0.02;
|
var ZOOM_SCALING = 0.02;
|
||||||
|
|
||||||
var MIN_ZOOM_DISTANCE = 0.01;
|
var MIN_ZOOM_DISTANCE = 0.01;
|
||||||
var MAX_ZOOM_DISTANCE = 200;
|
var MAX_ZOOM_DISTANCE = 14000;
|
||||||
|
|
||||||
var MODE_INACTIVE = 'inactive';
|
var MODE_INACTIVE = 'inactive';
|
||||||
var MODE_ORBIT = 'orbit';
|
var MODE_ORBIT = 'orbit';
|
||||||
|
@ -255,14 +255,6 @@ CameraManager = function() {
|
||||||
that.updateCamera();
|
that.updateCamera();
|
||||||
}
|
}
|
||||||
|
|
||||||
that.getZoomPercentage = function() {
|
|
||||||
return (that.zoomDistance - MIN_ZOOM_DISTANCE) / MAX_ZOOM_DISTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
that.setZoomPercentage = function(pct) {
|
|
||||||
that.targetZoomDistance = pct * (MAX_ZOOM_DISTANCE - MIN_ZOOM_DISTANCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
that.pan = function(offset) {
|
that.pan = function(offset) {
|
||||||
var up = Quat.getUp(Camera.getOrientation());
|
var up = Quat.getUp(Camera.getOrientation());
|
||||||
var right = Quat.getRight(Camera.getOrientation());
|
var right = Quat.getRight(Camera.getOrientation());
|
||||||
|
|
Loading…
Reference in a new issue