I have Actor 1 = Light bulb location, and Actor 2 = Player location.
Then I do a “find look at rotation”, and finally, I convert that value into a global material collection float parameter.
Is there a way to do this math in a material graph?
Is there an equal to “Find look at rotation” in materials? Or a way to do it with maths?
So far, I’ve only got this.
I can’t give you a specific answer, but I think you might have more joy looking into cross product, because from U and V it will give you the perpendicular.
I tested it a bit and it seems that this:
should give the same result as Find Look At Rotation’s Z component. Give it a try and say if it’s right for you.
Here is my test. But we also need to rotate Normals and probably Tangents. In a case if a material has lighting.