Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What does ordered interruption do?

Discussion in 'Animation' started by Baste, Apr 6, 2016.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    A transition in mechanim has a toggle named "Ordered Interruption".

    The docs state that this "Determines whether the current transition can be interrupted by other transitions independently of their order."
    Mousing over the option shows a tooltip stating "Can only be interrupted by higher priority transitions".

    Neither of these are helpful. I'm assuming that "order" and "priority" are the same things, but what are they? Does anybody know?
     
    marcospgp likes this.
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
  3. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    this toggle allow you to define if this transition can be interrupted only by a transition with a higher priority or any transition.

    To define transition priority you must select the source state or destination state and order the transition list, the first one has the highest priority and the last one the lowest priority. You can reorder transition by dragging them in the list
    order.png
     
    Ignacii, marcospgp and Knarhoi like this.
  4. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Ah, that makes sense. I guess it's confusing because the list of transitions is usually not visible when I'm editing a transition, as I've got the transition, not the state selected.

    This information should probably be added to the documentation.

    Thanks.


    ... WAIT, does this mean that the ORDER IN THE TRANSITION LIST decides which transition is selected when two gets their condition fulfilled on the same frame?

    That is a very useful feature! It's not at all obvious, though, and is AFAIK not written down anywhere in the documentation. The header for the Transition list should really be "Transition priority", not just "Transitions".
     
    theANMATOR2b likes this.
  5. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Exactly we do test each transition in the same order than they appear in the list, the first one to fulfill all conditions is used.

    I'm taking a note for this, we will update the doc
     
    joext and PZ4_Bailey like this.
  6. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    How does this setting relate to interruptions from the "Any State"? I would like my transition to be uninterruptable from both the "Current" and "Next" states, but interruptible by transitions from the "Any State".
     
  7. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    sorry but this is not possible at the moment.
     
  8. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    joext likes this.
  9. miroki123

    miroki123

    Joined:
    Oct 27, 2017
    Posts:
    16
    Sorry to jump this late, but is this still not possible?
    Any State is such a special transition I'm surprised there's not an option to account for that.
    Certain actions (like dying for instance) can take place at any given time, since we cannot predict where it will come from, makes sense to use Any State.
     
  10. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    unfortunately yes, we didn't change this.
     
  11. PZ4_Bailey

    PZ4_Bailey

    Joined:
    Oct 15, 2017
    Posts:
    6
    Omw this is exactly what i was looking for, why doesnt Unity make this clear to us. Thanks bro!
    E="Mecanim-Dev, post: 2595980, member: 158244"]Exactly we do test each transition in the same order than they appear in the list, the first one to fulfill all conditions is used.



    I'm taking a note for this, we will update the doc[/QUOTE]
    xactly
     
  12. marcospgp

    marcospgp

    Joined:
    Jun 11, 2018
    Posts:
    194
    The documentation is still unclear on this, and this thread wasn't very explanatory either.

    I think I understood what's going on reading the blog post linked above however - it seems that the current transition is kept in the queue while it is running, and thus if there is an interruption but the current transition has higher priority (being higher in the queue) we stay on it.

    This is not at all clear in the documentation!

    And it is not obvious that the current transition will remain queued when it has been started, this is normally not how queues work.

    Why isn't this option called "Ignore lower priority transitions" or something like that if the interruptions are always ordered regardless of whether "Ordered Interruption" is checked?
    It seems the interruptions are always ordered based on the transition priority regardless.

    Now I noticed the option has a tooltip saying basically this, but still the name should be changed to something like "Always interrupt", for example (with its value being reversed from current).
     
    Last edited: Mar 9, 2021
    Strance likes this.