- Home /
What is the difference between AngleAxis and Euler in this example?
Are the following lines different in any way?
MyObject.rotation *= Quaternion.AngleAxis (RotationValue * Time.deltaTime, Vector3.up );
MyObject.rotation *= Quaternion.Euler (0f , RotationValue * Time.deltaTime , 0f);
Both seem to work the same way but I thought maybe I'm missing something. Or maybe one is faster than the other?
Answer by FortisVenaliter · Jul 17, 2017 at 09:15 PM
Both should work the same way. I would stick to Euler for this example, as it's easier to read.
Where AngleAxis really shines is with arbitrary axes. If you're rotating around the standard coordinate axes, then Euler is usually enough.
Answer by Cornelis-de-Jager · Jul 17, 2017 at 09:30 PM
Angle axis you have two options:
You can choose how many degrees it rotates
Around what axis it rotates
Within euler you only have one option: 1. The magnitude of rotation with respect to transforms axis.
They are basically the same, however, Angle Axis gives you more control over how the transform rotates. Where as in Euler if you want the same effect you should do allot of computation to get the correct vertor3.
Normally this isn't a problem since most transformations are not that complex. But should you be doing a cut scene where the object should change the way it rotates multiple times, it would be easier to use Angle Axis rather than doing the computation multiple times.
Your answer
![](https://koobas.hobune.stream/wayback/20220612130513im_/https://answers.unity.com/themes/thub/images/avi.jpg)