I use Eevee and I decided to do synthesizer animation. Faced a problem that I do not know how to properly make the material. The essence of the material is the color change when animating the keys.
Material in action:
The problem is that the color change is associated with specific coordinates, and I cannot move the synthesizer. How to associate a color change, for example, with the touch of one object to another? Or change the color relative to the main part of the synthesizer? Maybe there is a better way?