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.
Yes i believe OrbitControls is the right option and performs how i expect, except for this unintended jitter. I added additional update()'s to satisfy when the car’s position is updated as well, the jitter remains.
I’ve researched problems similar to mine and never heard of a “Skeleton Demo” being requested, and im not sure how the skeleton will help you as the problem appears to be related to the manipulation of camera matrices. Based on the footage im wondering if anyone has experienced something similar or can point me in the right direction.
I once got a similar problem, and it was because I was calling renderer.render(scene, camera) in a different node tick instead of sequentially after updating my camera
You can refactor like this:
camera.position.set(cameraPosX, cameraPosY, cameraPosZ);
cameraOrbitControls.target.copy(carNewPosition)
…
cameraOrbitControls.update();
renderer.render()
You want to … Update camera.position, and controls.target…then call controls.update()
then call renderer.render() in that order, all in the same frame.