From 56ddff1ebf424efd7ce02a22932f47be112f4ac3 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Tue, 12 May 2015 16:28:47 +0200 Subject: [PATCH] Revert "Up / Down instead of Left / Right for U-turn" This reverts commit 7f8767d6db7657fbf78bc6ed3f2916d451f4634f. --- static/js/prototype/ArrowCamera.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/static/js/prototype/ArrowCamera.js b/static/js/prototype/ArrowCamera.js index 6b488f2..7c19e40 100644 --- a/static/js/prototype/ArrowCamera.js +++ b/static/js/prototype/ArrowCamera.js @@ -135,17 +135,12 @@ ArrowCamera.prototype.regenerateArrow = function(mainCamera) { if (fp1.dot(dir) < -0.5) { // Regen polynom with better stuff - // var new_dir = Tools.cross(Tools.diff(this.position, mainCamera.position).normalize(), mainCamera.up); - // new_dir.multiplyScalar(new_dir.dot(fp1) < 0 ? 1 : -1); - // new_dir.add(dir); - // new_dir.add(dir); - // new_dir.multiplyScalar(2); - var up = new THREE.Vector3(0,1,0); - - if (mainCamera.position.y < this.position.y) - up.multiplyScalar(-1); - - f0.add(Tools.mul(up,2)); + var new_dir = Tools.cross(Tools.diff(this.position, mainCamera.position).normalize(), mainCamera.up); + new_dir.multiplyScalar(new_dir.dot(fp1) < 0 ? 1 : -1); + new_dir.add(dir); + new_dir.add(dir); + new_dir.multiplyScalar(2); + f0.add(new_dir); } fp1.multiplyScalar(4);