Skip to content

Commit 65433d1

Browse files
Fix initial camera rotation to be looking at center, same as in EditorControls when you start to rotate (#801)
1 parent e2db22c commit 65433d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/cameras.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export function initCameras(inspector) {
3939
perspectiveCamera.far = 10000;
4040
perspectiveCamera.near = 0.01;
4141
perspectiveCamera.position.set(0, 1.6, 2);
42-
perspectiveCamera.lookAt(new THREE.Vector3(0, 1.6, -1));
42+
const center = new THREE.Vector3(0, 1.6, 0); // same as in viewport.js
43+
perspectiveCamera.lookAt(center);
4344
perspectiveCamera.updateMatrixWorld();
4445
sceneEl.object3D.add(perspectiveCamera);
4546
sceneEl.camera = perspectiveCamera;

0 commit comments

Comments
 (0)