Search Unity

Simple question - can't find answer. What is Unity's order of rotation?

Discussion in 'Getting Started' started by Tset_Tsyung, Apr 24, 2017.

  1. Tset_Tsyung

    Tset_Tsyung

    Joined:
    Jan 12, 2016
    Posts:
    411
    Hey all,

    Been ages since I've been on here (took some time to learn Game Maker... I'm back).

    So I've spent most of the evening trying to answer a simple question: What is Unity's order of rotation?

    Can I find the answer anwhere? Nope!

    Anyone know for sure?
     
  2. Tset_Tsyung

    Tset_Tsyung

    Joined:
    Jan 12, 2016
    Posts:
    411
    Also, when it runs through it's order of rotation is it rotating on it's own updated axis (i.e. once X, if it's first, has been updated do it's next execution on the new setup or the previous setup)? Or the world axis (which never changes)?
     
    marcospgp likes this.
  3. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,529
    The order is first come, first serve.

    Code (csharp):
    1.  
    2. public void Update()
    3. {
    4.         transform.rotation = Quaternion.identity; // this occurs immediately.
    5. }
    If you did another transform change later in the code, it would also occur immediately.

    If you are referring to how Quaternion.Euler works, the docs explain it.

    If you meant Order Of Events, that's here.
     
    JoeStrout likes this.