DEV Community

Khaled Ali
Khaled Ali

Posted on

React Three Fiber - Smoothly turn camera towards at a position vs Camera.lookAt

After trying some solutions including 3rd party libs and more vanilla Three.js ways, I found a clean react-y way to have the camera smoothly look at a given position using React Three Fiber.

Thought I'd share! The Codesandbox has comments describing what I did. Just rip out that hook and use in your code.

Top comments (0)