On-Spot Rotate of Object (At a different pivot point) Using DragControls

I’ve question regarding rotating an object on the spot (even though the geometry is at a different pivot point). Any help would be greatly appreciated !

The problem I’m facing is a bit hard to phrase. So, I’ve attached a couple of snapshots and a codepen as well…

Basically, I’ve an interactive object/marker, which you can use to drag and rotate. As I drag, rotate the marker, I intend to make another object3d (torus) follow/rotate the marker.

But the object3d’s geometry has a different pivot point (1, 0, -1). I was able to compensate for the pivot distance for dragging, but couldn’t think of ways to rotate on-spot. Currently, the object3d rotates in an epicyclic manner.

One condition is that the my use case does not permit to compute the geometry’s center, since the vertices might change.


(Img 1): Imgur: The magic of the Internet


A bit confused about which part is the object and which is the marker. Did you try just adding the marker to the object as a child? It would then automatically inherit position and rotation of the object (a bit easier than manually calculating offsets. :sweat_smile: )

That’d help, but I sort of attached a Mesh Geometry as example.
The actual example might be of Points type, and with varying offset.

And I thought a mathematical implementation would help, as opposed to appending as child element.