Making camera watch certain direction, not moving direction!

When I create a free camera using the following code:

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?

Regard

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

Hi JohnK,

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

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

3 Likes

Thanks for providing a solution.

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

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