Hi, In my scene I have a direction light. I want to be able to set the angle of the light to the ground. So I got:

RotatingLight.transform.localEulerAngles = new Vector3(xValue, 0,0);

Then I want it to rotate around my scene, so rotating around the local y-axis. I changed my code to:

RotatingLight.transform.localEulerAngles = new Vector3(xValue, yValue*360,0);

However when I play the scene it rotates around the x-axis correctly, but then it rotates around the global y-axis instead of the local y-axis. What am I doing wrong?

changed it to
localRotation = Quaternion.euler(xValue, 0, 0) * Quaternion.euler(0, yValue, 0);

and it works. Not the effect i was hoping to get :frowning: