Comments and answers for "When to use Quaternion vs Euler Angles?"
http://answers.unity.com/questions/765683/when-to-use-quaternion-vs-euler-angles.html
The latest comments and answers for the question "When to use Quaternion vs Euler Angles?"Comment by ZeRoHuK on ZeRoHuK's comment
http://answers.unity.com/comments/1146915/view.html
Dude you made me laugh a lot ahahaha TY! :DWed, 24 Feb 2016 21:56:48 GMTZeRoHuKComment by robertbu on robertbu's answer
http://answers.unity.com/comments/765799/view.html
You cannot represent rotations of greater than 180 degrees with Quaternions, and when doing a Slerp() or MoveTowards() rotation with Quaternions, the rotation always take the shortest path. So if you need to rotate more than 180 degrees, often EulerAngles are a better choice. Note you can use Quaternions for doing rotations of more than 180 degrees, but you have to play games that can make the code more complicate.
Note I've read a couple of claims that there are smoothness issues with Quaternion interpolation. I visually don't see it, but smarter people have argued the fact.Thu, 07 Aug 2014 05:45:18 GMTrobertbuComment by Kiwasi on Kiwasi's answer
http://answers.unity.com/comments/765793/view.html
You use euler angles for something like this:
rotation.eulerAngles = new Vector3(0, 30, 0);
Very difficult to set a specific angle with a quaterion
Both are different application. I tend to use eulerAngles far more often then I use quaternions.Thu, 07 Aug 2014 05:21:06 GMTKiwasiComment by HauntedHotPocket on HauntedHotPocket's answer
http://answers.unity.com/comments/765783/view.html
@BoredMorm, that looks like it would accomplish 99% of most jobs. Just curious when you might use a EulerAngle (if ever)?Thu, 07 Aug 2014 04:37:41 GMTHauntedHotPocketComment by Kiwasi on Kiwasi's answer
http://answers.unity.com/comments/765776/view.html
Use a quaterion to copy a rotation.
Quaterion myQuaterion = transform.rotation;
otherTransform.rotation = myQuaterion;
Use euler angles to change or set up a new rotation:
rotation.eulerAngles = new Vector3(0, 30, 0);
By the time you have a PhD in mathematics to use quaternions directly you will no longer be interested in writing games.
Edit: Added example for euler anglesThu, 07 Aug 2014 04:22:30 GMTKiwasiComment by HauntedHotPocket on HauntedHotPocket's answer
http://answers.unity.com/comments/765770/view.html
That was incredibly helpful. Thank you so much for the thoughtful response! I should have mentioned that yes, I have no intention in the immediate future of going 'inside' the quaternions - though maybe by Unity v16.0 I'll know how ; - D This definitely helps gives a much better vantage of the different methods and how/why to use them. Thank you!!!Thu, 07 Aug 2014 04:21:50 GMTHauntedHotPocketAnswer by rutter
http://answers.unity.com/answers/765735/view.html
Quaternions have some advantages when it comes to gimbal lock and smooth interpolation. Their main downside is that they rely on advanced math -- math that even experienced developers often find difficult and confusing.
From the [scripting manual](http://docs.unity3d.com/ScriptReference/Quaternion.html):
>[Quaternions] are based on complex numbers and are not easy to understand intuitively. You almost never access or modify individual Quaternion components (x,y,z,w); most often you would just take existing rotations (e.g. from the Transform) and use them to construct new rotations (e.g. to smoothly interpolate between two rotations). The Quaternion functions that you use 99% of the time are: Quaternion.LookRotation, Quaternion.Angle, Quaternion.Euler, Quaternion.Slerp, Quaternion.FromToRotation, and Quaternion.identity. (The other functions are only for exotic uses.)
People very rarely interact with quaternions directly. As it turns out, it's almost always easier to manipulate them using other representations:
* Angle-axis representation specifies a unit vector and a rotation about that vector (see [ToAngleAxis](http://docs.unity3d.com/ScriptReference/Quaternion.ToAngleAxis.html) and [AngleAxis](http://docs.unity3d.com/ScriptReference/Quaternion.AngleAxis.html) pages).
* Euler angle representation specifies rotation about the Z, X, and Y axes, in that order (see [eulerAngles](http://docs.unity3d.com/ScriptReference/Quaternion-eulerAngles.html) and [Euler](http://docs.unity3d.com/ScriptReference/Quaternion.Euler.html) pages).
The scripting manual suggests some of the most common tricks for manipulating or generating quaternions.
There are some scholarly articles around the net, if you'd like to understand more about the math behind quaternions. If you plan on using them a lot, I highly recommend at least skimming some.
I recommend using quaternion variables to represent two things: an object's rotation, and/or a rotation which you'd like to apply to some object. Even when using them for that purpose, it's almost always easier to generate them using the methods described above, or by taking an existing quaternion and rotating it by some amount you just generated.
It's very rare that you need to actively examine or manipulate quaternions that you didn't create yourself. It's usually easier to use vector math to solve problems, including clever use of dot and cross products.Thu, 07 Aug 2014 02:42:53 GMTrutter