Improved camera motion when laggy

This commit is contained in:
Thomas FORGIONE 2015-06-11 11:49:42 +02:00
parent 44f3d37ccb
commit ec0eab5651
1 changed files with 4 additions and 4 deletions

View File

@ -105,10 +105,10 @@ PointerCamera.prototype.hermiteMotion = function(time) {
PointerCamera.prototype.normalMotion = function(time) {
// Update angles
if (this.motion.increasePhi) {this.phi += this.sensitivity; this.changed = true; }
if (this.motion.decreasePhi) {this.phi -= this.sensitivity; this.changed = true; }
if (this.motion.increaseTheta) {this.theta += this.sensitivity; this.changed = true; }
if (this.motion.decreaseTheta) {this.theta -= this.sensitivity; this.changed = true; }
if (this.motion.increasePhi) {this.phi += this.sensitivity * time / 20; this.changed = true; }
if (this.motion.decreasePhi) {this.phi -= this.sensitivity * time / 20; this.changed = true; }
if (this.motion.increaseTheta) {this.theta += this.sensitivity * time / 20; this.changed = true; }
if (this.motion.decreaseTheta) {this.theta -= this.sensitivity * time / 20; this.changed = true; }
if (this.dragging) {
this.theta += this.mouseMove.x;