Correct discontinuity

This commit is contained in:
Thomas FORGIONE 2015-04-17 11:22:11 +02:00
parent 1ca1b6b6c4
commit dfb55a9bad
1 changed files with 5 additions and 1 deletions

View File

@ -141,7 +141,11 @@ FixedCamera.prototype.regenerateArrow = function(mainCamera) {
var vertices = new Array(); var vertices = new Array();
var t = [0,1]; var t = [0,1];
var f = [mainCamera.position.clone(), this.position.clone()]; 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); var hermite = new Hermite.Polynom(t,f,fp);
vertices.push(hermite.eval(0.5)); vertices.push(hermite.eval(0.5));