From e694f6e8cddde2dede96e43b0269a975cd146c18 Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Wed, 30 Aug 2017 01:01:44 -0400 Subject: [PATCH] fixed camera vector calculations --- saku/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/saku/index.js b/saku/index.js index d69484b..aa1580e 100644 --- a/saku/index.js +++ b/saku/index.js @@ -128,8 +128,8 @@ function projectObj(object, scene) { var cF = scene.camera.focal; // Camera direction vector var cV = [ - Rnd(cF*Math.sin(toRad(cR[1])),3), // 0 Degrees Z points straight to Y. - Rnd(cF*Math.cos(toRad(cR[1])),3), + Rnd(cF*Math.cos(toRad(cR[0]))*Math.sin(toRad(cR[1])),3), // 0 Degrees Z points straight to Y. + Rnd(cF*Math.cos(toRad(cR[0]))*Math.cos(toRad(cR[1])),3), Rnd(cF*Math.sin(toRad(cR[0])),3) // 0 Degrees X points straight to Y. ];