Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #277 from AnalyticalGraphicsInc/tilt

Camera Tilt
  • Loading branch information...
commit 4a7d67c8dc71f5e3f63f52ed85d624e4b926f7dd 2 parents 76a3db1 + f14cb90
@pjcozzi pjcozzi authored
View
6 CHANGES.md
@@ -4,6 +4,12 @@ Change Log
Beta Releases
-------------
+### b10 - xx/xx/2012
+
+* Breaking changes:
+ * xxx
+* Improved middle mouse click behavior to always tilt in the same direction.
+
### b9 - 10/01/2012
* Breaking changes:
View
5 Source/Scene/CameraCentralBodyController.js
@@ -125,7 +125,10 @@ define([
camera.right = Cartesian3.fromCartesian4(invTransform.multiplyByVector(new Cartesian4(right.x, right.y, right.z, 0.0)));
camera.direction = Cartesian3.fromCartesian4(invTransform.multiplyByVector(new Cartesian4(direction.x, direction.y, direction.z, 0.0)));
- this.spindleController._rotate(movement);
+ var yDiff = movement.startPosition.y - movement.endPosition.y;
+ if (!camera.position.normalize().equalsEpsilon(Cartesian3.UNIT_Z, CesiumMath.EPSILON2) || yDiff > 0) {
+ this.spindleController._rotate(movement);
+ }
position = camera.position;
up = camera.up;
View
4 Source/Scene/CameraSpindleController.js
@@ -223,8 +223,8 @@ define([
};
CameraSpindleController.prototype._moveVertical = function(angle) {
- if (typeof this.constrainedAxis !== 'undefined') {
- var p = this._camera.position.normalize();
+ var p = this._camera.position.normalize();
+ if (typeof this.constrainedAxis !== 'undefined' && !p.equalsEpsilon(this.constrainedAxis, CesiumMath.EPSILON2)) {
var dot = p.dot(this.constrainedAxis.normalize());
if (CesiumMath.equalsEpsilon(1.0, Math.abs(dot), CesiumMath.EPSILON3) && dot * angle < 0.0) {
return;
Please sign in to comment.
Something went wrong with that request. Please try again.