Having an issue with LookAt in R3F

Hello again,
I’m trying to add some interactivity to my project and I’m trying to use lookAt. I’m having an issue with this though - the model either appears zoomed in and clipping or completely disappears based on the near value of the camera, with no in-between. In blender I have joined all the meshes into one, set the origin to {0, 0, 0}, and applied all transforms before exporting. I’m still having issues.

CodeSandbox

1 Like

Use:

camera.position.lerp(vec.set(pointer.x, pointer.y, 4), 0.05)

or

      camera={{
        position: [7.569, 1.09, 4],
        far: 40,
        near: 2,
        fov: 20.968
      }}

your camera needs to be further away from the model to display it fully.

2 Likes