I haven't looked at the code very closely yet, but why don't you use the rotation pivot for this task instead? That's the point around which an object will be rotated. It's given in object space, so if both objects have a center of (0,0,0) (in object space, not in world space) and you place object1 at (0,0,0) in world space and object2 at (10,10,0) in world space, object2's rotation pivot should be set to (-10,-10,0) to make it rotate around object1's center. One can easily mix up the spaces, so it can be a bit tricky to find the correct pivot, but once you have it, things should be easier. Another possibility: Place a dummy object at the center (in world space) of object1 and make object2 a child of it. Then rotate that dummy object.