Rotating an object using other object's position as pivot

Hey everyone, is there a possibility to rotate an object using other’s position as pivot without parenting this object to an empty and rotating the empty? What I wanted to do is the following:

So the position should be the turret’s position and the big spider should rotate using this as pivot.

There’s a way I can do this by code?

Thanks for any help !

Simply use Transform.RotateAround().

Sure you could do it in code. Just reference the other object and adjust your transform accordingly. You could go either way: with the script on the pivot or script on the orbiting object.