How to get the direction vector of light in blueprint

Hi guys, i wana use blueprint script to make a material like cartoon effect, i think i can use “vertexNormalWS” to dot a light direction vector to condition which color for the part of mesh. but the question is i don’t known how to get the light direction vector in the blueprint, so anybody can give me some hints? Thanks!

1 Like

so make two vector 3 variables, one where the light starts then one where it ends. Use find lookat rotation from those two vector3s, then get forward vector.

Thank a lot for your reply, based your answer i have another question, how to get the end position of lighting?is it means calculate it by manually? or have any other nodes or methods can get it? Thanks!

if you are still looking for the answer, using Forward vector of the light might do the trick