Looking with the camera to the center of the stage in Three.js revision 70

An example of setting the "eye" of the camera on the center of the stage in Three.js rev. 70
camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 10000);
camera.position.x = 180;
camera.position.y = -380;
camera.position.z = -180;

camera.lookAt(new THREE.Vector3(0, 0, 0)); // we set here a vector for the camera to look at

Responses

0 Replies