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)
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)
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 updating camera controls in main loop)