From f32962f393dc3dd47f9dffaafe5899ca05c5e5ea Mon Sep 17 00:00:00 2001 From: Daniel Ribeiro Date: Mon, 31 Oct 2011 13:04:19 -0200 Subject: [PATCH] Making unfreeze (Q key) give back the control of the camera rotation (with the mouse). --- src/extras/controls/FirstPersonControls.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extras/controls/FirstPersonControls.js b/src/extras/controls/FirstPersonControls.js index a8128328e9..1c5c28aa12 100644 --- a/src/extras/controls/FirstPersonControls.js +++ b/src/extras/controls/FirstPersonControls.js @@ -140,7 +140,7 @@ THREE.FirstPersonControls = function ( object, domElement ) { case 82: /*R*/ this.moveUp = true; break; case 70: /*F*/ this.moveDown = true; break; - case 81: this.freeze = !this.freeze; break; + case 81: /*Q*/ this.freeze = !this.freeze; break; } @@ -170,7 +170,7 @@ THREE.FirstPersonControls = function ( object, domElement ) { }; this.update = function( delta ) { - + var actualMoveSpeed = 0; if ( !this.freeze ) { if ( this.heightSpeed ) { @@ -186,7 +186,7 @@ THREE.FirstPersonControls = function ( object, domElement ) { } - var actualMoveSpeed = delta * this.movementSpeed; + actualMoveSpeed = delta * this.movementSpeed; if ( this.moveForward || ( this.autoForward && !this.moveBackward ) ) this.object.translateZ( - ( actualMoveSpeed + this.autoSpeedFactor ) ); if ( this.moveBackward ) this.object.translateZ( actualMoveSpeed ); -- GitLab