# Camera looking in different direction

**URL:** <https://discourse.threejs.org/t/camera-looking-in-different-direction/44422>\
**Category:** Questions\
**Tags:** transform, camera\
**Created:** [November 7, 2022, 10:13am UTC](https://discourse.threejs.org/t/camera-looking-in-different-direction/44422 "2022-11-07T10:13:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MD\_Sayeed\_Khan](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/md_sayeed_khan/32/30744_2.png) [@MD\_Sayeed\_Khan](https://discourse.threejs.org/u/MD_Sayeed_Khan)\
**Post date:** [November 7, 2022, 10:13am UTC](https://discourse.threejs.org/t/camera-looking-in-different-direction/44422/1 "2022-11-07T10:13:32Z")

</div>

hello all  
i have a 3d model on scene its a collada file  
i also have the translation and rotation values of each camera points used to create the model  
i am using these values to calculate the camera position and rotation and move the camera to that location to view that particular image on the 3D model

in the video : the 3d model is loaded  
when i click on submit the parameters of image1 is taken and the camera is moved to that particular location  
image1:

 ![Img_0600](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/b/4/b42c34a936c0e851da6097b9d835766aaf2b4271.jpeg)

my camera is always looking at -z (negative Z ) Axis ,  
the camera has moved to the right location and as image 1 is in view of -Z axis everything worked fine  
you can see the camera location marked in red circle in the video  
now as soon as i scroll in or out or click the camera is looking at the origin

image 2 :

 ![Img_0026](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/a/8a47131fe6ed07934223cbfac72741b4c7cf0502.jpeg)

when i load another image to view which we should see in x axis  
i use the parameters of image 2 and calculate the camera point . when i click on submit(which sets the camera to calculated camera position ) we see that i get a blank screen and when i zoom out a little the camera is looking at origin . but with the camera point marked with red circle we can see that the camera position was correct but as it was looking in -z axis we could not see the model  
and when i zoom out it look at origin and we can see the approx image view on the model  
i want my camera to look towards the model after rotation .  
i am using a perspective camera

camera.rotation.elements = R21.elements; //( 9 elements )  
var cpt = new THREE.Vector3(\_C21.x, \_C21.y , \_C21.z); //(\_C21 vector has my camera position 3 elements)

```
camera.position.x = cpt.x;
camera.position.y = cpt.y;
    camera.position.z = cpt.z;

```

[https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/9/f95291eddb2a4a0ce990d882f16b87fa2ae68e89.mp4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/9/f95291eddb2a4a0ce990d882f16b87fa2ae68e89.mp4)

thanks
