Search Unity

a way to switch from walking locomotion to running locomotion

Discussion in 'Animation' started by NikoBusiness, Feb 15, 2015.

  1. NikoBusiness

    NikoBusiness

    Joined:
    May 6, 2013
    Posts:
    289
    hello guys i have a set of animation ready (forward back right left) for walking and with a shift button down i want to be triggered the running animation.Which is the best way to do that?one way i thought is to add running animations to a new layer but i have other layers too and when i create a new layer i can't change the hierarchy so it does not override the other layers i want it to override only the baselayer.The other way is to continue in the baselayer
     
  2. TheLetterS

    TheLetterS

    Joined:
    Jan 22, 2013
    Posts:
    31
    Hi NikoBusiness,

    The way we did it was to keep the running (in our case sprinting) layer in the same blend tree as walking with speed set higher than walking (so walking may be speed = 1, running would be speed = 2). Then just script the speed to be 2 when holding down the shift key. This way the animations still blend together nicely.

    Hope this helps!
     
    theANMATOR2b likes this.
  3. NikoBusiness

    NikoBusiness

    Joined:
    May 6, 2013
    Posts:
    289
    nice idea! thanks