Comments and answers for "EulerAngles.x stops at 90???"
http://answers.unity.com/questions/477417/euleranglesx-stops-at-90.html
The latest comments and answers for the question "EulerAngles.x stops at 90???"Comment by davidnibi on davidnibi's answer
http://answers.unity.com/comments/1836260/view.html
Thanks @robertbu, this works really well!Thu, 13 May 2021 22:54:29 GMTdavidnibiAnswer by holyfot
http://answers.unity.com/answers/1778467/view.html
Use: transform.localRotation.eulerAngles.x or y or z instead of transform.localEulerAngles. This lets you get a full 360 range.Thu, 08 Oct 2020 04:03:32 GMTholyfotComment by Glacier Games on Glacier Games's answer
http://answers.unity.com/comments/478136/view.html
Yeah, I know Eric. It just seemed like a simple way to express my issue.Thu, 20 Jun 2013 22:12:33 GMTGlacier GamesComment by robertbu on robertbu's answer
http://answers.unity.com/comments/477464/view.html
Yep. Changed the answer.Wed, 19 Jun 2013 20:12:57 GMTrobertbuComment by Eric5h5 on Eric5h5's answer
http://answers.unity.com/comments/477457/view.html
Also you wouldn't want to increment the x angle by 1 every Update, since that's framerate-dependent.Wed, 19 Jun 2013 20:04:06 GMTEric5h5Comment by robertbu on robertbu's answer
http://answers.unity.com/comments/477441/view.html
It will never be fixed. For rotations, Unity uses Quaternions for a number of valid technical reasons. Euler angles is just a representation of the Quaternion, and when you pull a euler angle back out of a quaternion, you are not guaranteed that the values will be the same as the ones you put in. In theory, you should be able to write code to normalize the rotation so that you can have an expected value, but it is just easier to maintain your own Vector3 as I've done above. And there are other possible ways to solve this problem.Wed, 19 Jun 2013 19:37:28 GMTrobertbuComment by Glacier Games on Glacier Games's answer
http://answers.unity.com/comments/477436/view.html
Works like a charm! Thanks! Unity really needs to fix the whole eulerAngles deal.. This isn't the first time I ran into something like this.Wed, 19 Jun 2013 19:24:55 GMTGlacier GamesAnswer by robertbu
http://answers.unity.com/answers/477427/view.html
This issue comes up frequently. There are multiple euler angle representations for any physical representation, and Unity/Quaternions can change the representation. For example, run this code:
function Start() {
transform.eulerAngles = Vector3(180,0,0);
Debug.Log(transform.eulerAngles);
}
What you will get back is (0,180,180)...the same physical rotation but a different euler representation. One solution is to maintain your own Vector3, and treat eulerAngles as write-only.
var v3 = Vector3.zero;
var speed = 25.0;
function Start() {
transform.eulerAngles = v3;
}
function Update() {
v3.x += speed * Time.deltaTime;
transform.eulerAngles = v3;
}Wed, 19 Jun 2013 18:58:31 GMTrobertbu