Skip to content

Commit

Permalink
Normalize cross product result for up vector
Browse files Browse the repository at this point in the history
At minima, normalizing the up vector obtained from cross product resolves issue CesiumGS#6640
Other cross product results in this function could also be normalized but only the up vector was causing the effect noticed in the mentioned issue.
  • Loading branch information
xtassin authored May 31, 2018
1 parent 34ef097 commit 137b260
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Core/Transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ define([
}

var up = Cartesian3.cross(right, velocity, upScratch);
Cartesian3.normalize(up, up);
Cartesian3.cross(velocity, up, right);
Cartesian3.negate(right, right);

Expand Down

0 comments on commit 137b260

Please sign in to comment.