Relative Content

Tag Archive for three.jsreact-three-fiberreact-three-dreiorbitcontrols

How to make orbit controls’ center something other than the center of the canvas?

I want to rotate an object or the camera around the center of an object, however the object is not placed in the center of the canvas, a little to the left. So using OrbitControls is making the object rotate it around the center of the canvas. When I change the target of the OrbitControls to the center of the object, due to how orbit controls is defined, it is rearranging the center again to the center of the canvas.