'Camera target.set() causing random world shake

I have a car moving on a road and the camera is updating its position and target to look at the car as it moves.

I am getting the strangest world shake/jittering.

cameraOrbitControls.object.position.set(cameraPosX, cameraPosY, cameraPosZ)

cameraOrbitControls.target.set(carNewPosition.x, carNewPosition.y, carNewPosition.z)

https://youtu.be/rAJyegrYPb8

However, i have narrowed the problem down to the camera target.set() call. When i remove this line the problem goes away, but its obviously not tracking the car how i would like anymore.

cameraOrbitControls.object.position.set(cameraPosX, cameraPosY, cameraPosZ)

// cameraOrbitControls.target.set(carNewPosition.x, carNewPosition.y, carNewPosition.z)

https://youtu.be/aia90b0z67Q

It feels like there is some bad matrix multiplication going on in target.set(...). Can anyone please explain this strange behavior?

(yes i have logarithmicDepthBuffer enabled and no sadly i cannot make this into a jsfiddle)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source