Get actor position from material blueprint

I am making a material for a planet and want the dark side to show city lights and the bright side to show normal color map. I know the math behind it but how do I get the position of the light source (an actor) in the material blueprint?

Thanks,

I think you’ll need to get the light information via Blueprint and feed it to a vector parameter you set in the material for light vector.

Thanks Jacky, can you please elaborate on how to feed the variable to the material as a parameter?

Found the answer I needed in addition to what Jacky said. The material parameter collection allows my material blueprint access the location of other actors.

can you explain how you did this? Did you set 3 parameters (x,y,z) in the tick of your light source and then combine them into a position vector in your material?