You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
After adding orbit controls, the camera is "looking at" the origin, not the camera's lookAt value.
How do you get the camera to lookAt a specific point when adding orbit controls?
Some example code:
camera = new THREE.OrthographicCamera(
globals.cameraDimensions.left,
globals.cameraDimensions.right,
globals.cameraDimensions.top,
globals.cameraDimensions.bottom,
1,
2000
);
// Sets the position to a Vector3 angle, then sets the length.
camera.position.set(0, 50, 100);
camera.up = new THREE.Vector3(0, 1, 0);
camera.lookAt(new THREE.Vector3(0, 50, 0));
renderer = new THREE.WebGLRenderer({ alpha: true, antialias: true });
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
controls = new THREE.OrbitControls(camera, renderer.domElement);
The text was updated successfully, but these errors were encountered:
Reproduce:
Issue:
After adding orbit controls, the camera is "looking at" the origin, not the camera's lookAt value.
How do you get the camera to lookAt a specific point when adding orbit controls?
Some example code:
The text was updated successfully, but these errors were encountered: