Orientation of the camera

getting-started
#1

Hi, I have a problem with the orientation of my camera.

This is my camera:

camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 2000);
camera.position.y = 20; // Height the camera will be looking from
camera.position.x = 0;
camera.position.z = 0;

I want to change the orientation of the camera, it must look down at the floor, how to do that?
I tried some rotation but it doesn’t works, thanks.

0 Likes

#2

Hi!
Have you tried camera.rotation.x = -Math.PI * 0.5;?

1 Like

#3

Or you are using .lookAt(). The camera will then look at the given target position.

2 Likes

#4

No, I didn’t write rotation like this
Thanks all, it works :slight_smile:

0 Likes