From dfb55a9bada90c010256e33664f71b758be6f0c9 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 17 Apr 2015 11:22:11 +0200 Subject: [PATCH] Correct discontinuity --- js/FixedCamera.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/FixedCamera.js b/js/FixedCamera.js index 01d7261..d292d2d 100644 --- a/js/FixedCamera.js +++ b/js/FixedCamera.js @@ -141,7 +141,11 @@ FixedCamera.prototype.regenerateArrow = function(mainCamera) { var vertices = new Array(); var t = [0,1]; var f = [mainCamera.position.clone(), this.position.clone()]; - var fp = [Tools.diff(mainCamera.target, mainCamera.position), Tools.diff(this.target, this.position)]; + + var first = Tools.diff(mainCamera.target, mainCamera.position); + first.normalize(); + + var fp = [Tools.mul(first,40), Tools.diff(this.target, this.position)]; var hermite = new Hermite.Polynom(t,f,fp); vertices.push(hermite.eval(0.5));