Search Unity

Animator Entry

Discussion in 'Getting Started' started by Bresan, Mar 14, 2015.

  1. Bresan

    Bresan

    Joined:
    Mar 14, 2015
    Posts:
    2
    Hello!

    I am a complete beginner with Unity, so I'm trying to follow the Survival Shooter tutorial to get familiar with how it works. I have finished and copied everything they did in the first 2 parts of the tutorial, up until the point when moving and the animations should be working. However, my animations don't seem to work properly. It always seems to be playing the "Idle" animation.

    The only difference I can notice between my project and their example one is that in the "Animator" window is that there's a box called "Entry", which they don't have in the example. This Entry-box is pointing with some sort of line towards the "Idle" animation. Is this somehow causing my problem? Can the Entry-box be removed?
     
    roshanjafri31_unity likes this.
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    The entry box can't be removed, and it's not the cause of the problems. The entry box is showing that your idle animation is the default state.

    The problem is somewhere else. Most likely your new animations are not being triggered.
     
    damobe likes this.
  3. amandaterasu

    amandaterasu

    Joined:
    Mar 13, 2015
    Posts:
    2
    I have a similar issue, possibly the same. I've checked and double checked that my code is the same as listed in the tutorial, and demonstrated in the video. The problem is that at the moment animations are not being interrupted to switch to a new animation. For example, when I test the game, it immediately enters the Idle Animation, as per its association with the Entry box. However, if I start moving, the idle animation will not interrupt, it will continue playing as my player glides along the floor. Once the idle animation is finished, it will switch to the movement animation. However, if I stop moving, it will play to the end of the movement animation, and if I remain still, start the idle animation again.

    How do I tell the system to interrupt these animations?

    Edited to add:

    I found the solution here: http://forum.unity3d.com/threads/survival-shooter-tutorial-part-2-error.308208/#post-2005199

    You need to go into the animator screen, select the animations, select the transitions, and uncheck "Has Exit Time" for both move and idle.
     
    Last edited: Mar 18, 2015
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You have to set a transition based on the speed value to the movement. If you've already done that, then delete the condition on the transition that says "wait for it to end".
     
  5. adhochero

    adhochero

    Joined:
    Feb 2, 2017
    Posts:
    43
    thanks i was having the same problem
     
  6. XJ2

    XJ2

    Joined:
    Mar 1, 2017
    Posts:
    7
    I have the same problem.
    I unchecked the "Has Exit Time" on all transition.

    My Player still doesn't move.

    Error msg as below:

    Asset 'PlayerAC': Transition in state 'AnyState' doesn't have an Exit Time or any condition, transition will be ignored
    UnityEditor.DockArea:OnGUI()

    Assertion failed on expression: 'timeSinceLastUsed >= 0'
     
  7. XJ2

    XJ2

    Joined:
    Mar 1, 2017
    Posts:
    7
    I deleted Player in Hierarchy and redo the step of creating the player.
    Restart Unity.

    The Error msg from console is gone.

    However, I still cannot move my player. It just stand there idling.

    Anyone can help me?
     
  8. XJ2

    XJ2

    Joined:
    Mar 1, 2017
    Posts:
    7
    I found the error.
    the culprit is void FixedUpdate not void FixedUpdated.

    **Saw this solution dated back to Dec 2015 in Unity forum.
     
  9. ashergarland

    ashergarland

    Joined:
    Jun 12, 2017
    Posts:
    4
    Had this issue in Unity 5.6. The problem is caused by the setting "Has Exit Time" which causes the entirety of the Idle animation to play before it will transition to the Move animation. The "Has Exit Time" is on by default in Unity 5.6; simply uncheck the setting for all transitions.
     
  10. PotatoKing4000

    PotatoKing4000

    Joined:
    Feb 12, 2018
    Posts:
    1
    Thank you so much, I had the exact same problem and this fixed it completely .
     
  11. hyanggock

    hyanggock

    Joined:
    Jul 9, 2017
    Posts:
    1
    I made empty state(nothing animation connected) and 'set state machine deflault state' to it