Search Unity

Unwanted behavior with joystick

Discussion in 'Animation' started by Arkolve, May 18, 2014.

  1. Arkolve

    Arkolve

    Joined:
    Dec 29, 2013
    Posts:
    20
    Hi guys, I'm facing unwanted behavior with my character.

    This is the context : I use a virtual joystick to move the character controller of my main character.
    The input value 0 is the center and varies up to 1 to the ends which is what I need and what I give to the Animator to change animations. Speed = 0 -> Idle , Speed > 0 -> Walk and Speed > 0.5 -> Run. Yet, when the player want to go to the opposite direction, he passes through the center of the joystick which gives the value "0" to the Animator for a short period of time but enough to starts "walk animation" and then "run animation" again wich causes a problem of limp to my character.

    Do you have any idea in order to avoid this problem ?

    Thank you in advance !