Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

MECANIM: How to stop the "Any State" transition being called multiple times to same state

Discussion in 'Animation' started by hersheys72, May 4, 2016.

Thread Status:
Not open for further replies.
  1. hersheys72

    hersheys72

    Joined:
    Sep 4, 2015
    Posts:
    7
    I have a player that is transitioning from "Any State" to a "Jump In Air" state with the condition of "Distance To Ground" > 3. This works well for when the player walks off of an edge etc, as instead of the "Jump Start" animation being played it just goes straight to the "in Air" loop, however the condition is true during the animation so it is being called multiple times and the animation doesn't play in its entirety.
     
    Foksnor likes this.
  2. hersheys72

    hersheys72

    Joined:
    Sep 4, 2015
    Posts:
    7
    THE FIX:
    - Expand the "Settings" in the inspector with the Any State - > Jump in air selected.
    - Deselect the "Can Transition To Self" toggle.
     
    BH-Dev, Buchi0, Topete9 and 23 others like this.
  3. hexdecc

    hexdecc

    Joined:
    Oct 24, 2014
    Posts:
    141
    saved my day...
     
  4. dhtpdud528

    dhtpdud528

    Joined:
    Apr 8, 2018
    Posts:
    14
    God...
     
  5. PurpleCoil

    PurpleCoil

    Joined:
    Apr 4, 2019
    Posts:
    1
    Fixed it, thanks alot!
     
  6. Zardify

    Zardify

    Joined:
    Jul 15, 2015
    Posts:
    12
    Holy sh.... after so many years I too end up here with the exact same situation. Thanks!
     
  7. Topete9

    Topete9

    Joined:
    Nov 3, 2020
    Posts:
    1
    Saved my day in 2023. Thank you!
     
  8. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,563
    Please don't necro posts, use the like button to show appreciation instead.

    Thanks.
     
Thread Status:
Not open for further replies.