ch9_Car_Showroom.htmlusing your favorite code editor.
cameraHome, cameraAzimuth, and
cameraElevationglobal variables. We set up the camera home position by using this variable inside the
configurefunction like this:
camera.goHome(cameraHome); camera.setAzimuth(cameraAzimuth); camera.setElevation(cameraElevation);
Let's use this code to configure the default pose for the camera when we load the Ford Mustang. Go to the
loadMustang function and append these lines:
cameraHome = [0,0,10]; cameraAzimuth = -25; cameraElevation = -15; camera.goHome(cameraHome); camera.setAzimuth(cameraAzimuth); ...