From 78ec96ae7f2eb3b2f31f3e2bf2d567450d91e333 Mon Sep 17 00:00:00 2001 From: Lev Date: Wed, 21 Jul 2021 20:01:19 -0500 Subject: [PATCH] Update changed camera aim and orientation --- CM2030 Graphics Programming/Topic 11/11.2.1 Camera/sketch.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CM2030 Graphics Programming/Topic 11/11.2.1 Camera/sketch.js b/CM2030 Graphics Programming/Topic 11/11.2.1 Camera/sketch.js index 27363fc..08d7755 100644 --- a/CM2030 Graphics Programming/Topic 11/11.2.1 Camera/sketch.js +++ b/CM2030 Graphics Programming/Topic 11/11.2.1 Camera/sketch.js @@ -21,6 +21,11 @@ function draw() { // camera location x, y, z | Pointing to x, y, z | Orientation(tilt) x,y,z camera(xLoc, yLoc, zLoc, 0, 0, 0, 0, 1, 0); + // Chaning focused point + let xAim = sin(frameCount * 2) * 300; + xAim = 0; + camera(0, 0, height, xAim, 0, 0, 1, 1, 0); + // objects normalMaterial(); torus(200, 50, 50, 50);