Direction of Directional Light

I’ve been trying to figure out how I can get the directional light pointed in the direction I want it in, and it obviously isn’t in degrees. I’ve looked under “Directional Light” in “Light and Shadows” and I’ve even tried “Hello Material”, because it had some things on light, but nothing concerning the direction of it.



The only way I’ve been able to get it remotely in the direction I want it, is to guess, then check, and then take another guess.

The DirectionalLight has a method setDirection() which takes a Vector3f.



If you are unfamiliar with vector math, you should read the “JME3 math for dummies” documentation :wink:

1 Like

Ok, I didn’t think of looking there :smiley:

Wow… less than 2 minutes later, I have my answer. Thanks polygnome.

1 Like