I am trying to create a system for aplying same gradient on different objects (hereinafter "objects") and control it with another object(hereinafter "controller"). And now the main problem is to "replicate" Texture coordinate "Object" output in geometry node. If i put obect info node inside geonodes of object everything works fine,[![enter image description here][1]][1] but when i trying to transfer attributes of obect info node from controller, blender starts calculating vector math not with objects, but with controller, although calculations take place inside geonodes of the object.[![enter image description here][2]][2]
(small wire cube is controler)

How to avoid this? I tried to use capture attribute to object position, store attribute to object position, store attribute to gradient location, nothing helped.

UPD 1

The problem with the position of the gradient is solved by adding the position of the gradient and the controller in the GN of the object (translation into the coordinate system of the object),
[![enter image description here][3]][3]
but if you rotate the objects, everything breaks.
[![enter image description here][4]][4]
Again I understand why this is happening, but I don't have the brains to solve it yet. (or just digging in vector math for 5 hours on end doesn't affect me very well:)).

UPD 2

I solved the problem, here is my GN set up:

Object GN
[![enter image description here][5]][5]
Controller GN
[![enter image description here][6]][6]

I'm not saying it's perfect or that it can't be simpler, but it works.
[![enter image description here][7]][7]
UPD 3
It works only for z rotation, working on x and y axis problem.

But another problem has arisen. I'm stuck on the number of allowed mix shader or what?

[![enter image description here][8]][8]


  [1]: https://i.sstatic.net/wWK3k.jpg
  [2]: https://i.sstatic.net/Ad5HE.jpg
  [3]: https://i.sstatic.net/UwLsK.png
  [4]: https://i.sstatic.net/X7pmm.png
  [5]: https://i.sstatic.net/SQsyV.png
  [6]: https://i.sstatic.net/DbvuN.png
  [7]: https://i.sstatic.net/JcPI5.png
  [8]: https://i.sstatic.net/uhYzm.png