This content originally appeared on DEV Community and was authored by Khaled Ali
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.
This content originally appeared on DEV Community and was authored by Khaled Ali
Khaled Ali | Sciencx (2024-07-12T23:24:30+00:00) React Three Fiber – Smooth Camera.lookAt. Retrieved from https://www.scien.cx/2024/07/12/react-three-fiber-smooth-camera-lookat/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.