Lerping camera and lookAt together with dynamic taret (React three fiber)

really there’s no big deal in using anything 3rd party for three in r3f: yomotsu camera-controls - CodeSandbox it’s the exact same thing, you only categorize it into side-effects and render-loop updates. you can optionally extend the jsx and “render” the control, or create it imperatively in a useMemo if you want.

function Controls() {
  const ref = useRef()
  const camera = useThree((state) => state.camera)
  const gl = useThree((state) => state.gl)
  useFrame((state, delta) => ref.current.update(delta))
  return <cameraControls ref={ref} args={[camera, gl.domElement]} />
}

<Controls />