Quantcast
Channel: Questions in topic: "localeulerangles"
Viewing all articles
Browse latest Browse all 106

localeulerangles changes global angles?

$
0
0
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?

Viewing all articles
Browse latest Browse all 106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>