# Making camera watch certain direction, not moving direction!

**URL:** <https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544>\
**Category:** Questions\
**Created:** [July 22, 2021, 6:26am UTC](https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544 "2021-07-22T06:26:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuangzheng\_Xia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kuangzheng_xia/32/17495_2.png) [@Kuangzheng\_Xia](https://forum.babylonjs.com/u/Kuangzheng_Xia)\
**Post date:** [July 22, 2021, 6:26am UTC](https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544/1 "2021-07-22T06:26:29Z")

</div>

When I create a free camera using the following code:

```auto
var camera = new FreeCamera('main-camera', new Vector3(0, 10, -80), scene);

```

I couldn’t see meshes, as they are behind the camera. Is there a way is adjust the camera direction so that it can toward meshs or a certain direction?

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/d/9d3663f1fedeb4452039e426f889ccff3cbf7880.png)

Regard

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [July 22, 2021, 8:10am UTC](https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544/2 "2021-07-22T08:10:23Z")

</div>

> **[FreeCamera | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/classes/babylon.freecamera#lockedtarget)**
>
> This represents a free type of camera. It can be useful in First Person Shooter game for instance.Please consider using the new UniversalCamera \[API\]

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [July 22, 2021, 8:29am UTC](https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544/3 "2021-07-22T08:29:01Z")

</div>

You can use `setTarget` to make the camera look at a specific target.

---

<div class="post-metadata">

**Author:** ![Kuangzheng\_Xia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kuangzheng_xia/32/17495_2.png) [@Kuangzheng\_Xia](https://forum.babylonjs.com/u/Kuangzheng_Xia)\
**Post date:** [July 22, 2021, 11:10am UTC](https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544/4 "2021-07-22T11:10:06Z")

</div>

Hi JohnK,

any luck for the camera to toward a certain direction without a target?

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [July 22, 2021, 1:47pm UTC](https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544/5 "2021-07-22T13:47:22Z")

</div>

camera.lockedTarget = camera.position.add(direction)

---

<div class="post-metadata">

**Author:** ![Kuangzheng\_Xia](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kuangzheng_xia/32/17495_2.png) [@Kuangzheng\_Xia](https://forum.babylonjs.com/u/Kuangzheng_Xia)\
**Post date:** [July 25, 2021, 6:30am UTC](https://forum.babylonjs.com/t/making-camera-watch-certain-direction-not-moving-direction/22544/6 "2021-07-25T06:30:15Z")

</div>

Thanks for providing a solution.

```auto
https://playground.babylonjs.com/#WPI5S5#1

```

I have created a playground, playing with the camera.lockedTarget.
