Third Person Follow Camera with Orbit Controls


I’m working on a scenario where the camera should follow a certain position vector.
And I do not have any Mesh/Object3D which I can parent to.

And I was able to set positions (with a third person follower offset) to the camera directly, with lookAt pointing at the position vector as well. But I ran into a certain issue.

Whenever the position of the target reverses, the camera also tends to move backwards, instead of moving around the point 180, and follow. It’d be great if you help simulate a perfect third-person follower logic

Additionally, I intend to implement OrbitControls for the follower camera as well. Basically, follow the target point, but also rotate/zoom around the point as well. When I tried this, I saw the hard position.set was conflicting with mouse event based OrbitControls.


For that example i made the camera simply lerp straight to the attached camera position as the OP needed a smooth chase when moving over a bumpy terrain.

The one you describe is more a pulling of a camera rig without the camera directly moving to the target position.

One solution is instead lerping the camera to the goal you can attach the camera to the Object3D rig and lerp that to follow the player keeping a constant distance. The Object3D pivot of that rig can lerp it’s orientation to the target/player.

For the pulling behaviour the orientaion can be derived from 2 points, one being the player and the other facing it, moving away/towards along that direction to keep distance, like a pen on a table you put your finger on one end and move it around. There are many ways to implement and improve this but that depends on the desired behaviour.

Here’s a simple example:

And here with keyboard controls (ASDW)

And here combinding both behaviours by using a attached “follow” object which provides the desired behind-player position, so even when not moving the camera will slowly move back behind the player.

(btw. if you run multiple embeded pens they will speed up for some reason)

There is no way to enable rotation, zoom in/ou in this approach due the current state on the Orbitcontrols?