Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Animation won't stop immediately

Discussion in 'Animation' started by james432213, Nov 5, 2018.

  1. james432213

    james432213

    Joined:
    Jun 14, 2018
    Posts:
    10
    When I stop walking (key press), the walking animation doesn't stop immediately, instead it finishes the walking animation loop. How do I get the animation to stop exactly when I let go of the movement keys?
    (In unity inspector the bool "isWalking" remains true until the animation loop is complete, even though the code says to turn 'isWalking' false when there's no player movement)

    Thank you.

    Edit: PROBLEM SOLVED
     
    Last edited: Nov 6, 2018
  2. james432213

    james432213

    Joined:
    Jun 14, 2018
    Posts:
    10
    Fixed - There wasn't a problem with the animation per se, there was a problem with my code involving transforms and vectors.
     
  3. milos4

    milos4

    Joined:
    Oct 22, 2017
    Posts:
    1
    Hi! how did you solved this?