Rotate target 3D object instead of orbiting around target (with source)

I saw few posts asking how to rotate a target 3D object in space instead of orbiting around it. Observe the shadows in both GIFs. The first one use ThreeJS OrbitControls to rotate the camera around the 3D human. The second part implementation allows you to directly rotate the 3D human while the scene/lighting remains stationary. Observe how shadows change like in real world. Hope this helps in your projects!

Live : Configurator App
Github Source : GitHub - craftpixels/R3F-Object-Controls: Supports smooth mouse and touch rotation with optional OrbitControls integration.

1 Like