Search Unity

Creating walk left and right animation

Discussion in 'Animation' started by yvanbroeck, Jan 14, 2014.

  1. yvanbroeck

    yvanbroeck

    Joined:
    Mar 20, 2013
    Posts:
    28
    Hi there folks,

    to get out of the coding stuff (for a little bit) I followed a couple of Blender tutorials about rigging and animating. So far I have a decent idle animation and a walking animation that I'm somewhat satisfied with. But in order to get Mecanim to work I need a walk left and right animation for my blend tree. Is there any easy or convenient way to do this? He just needs to turn right and left while walking (both horizontal and vertical input axis being pressed).

    I've tried myself and searched around on the web but to no avail.

    Some help would be appreciated :)

    - Yannick
     
  2. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    Are you asking how to set up the blend tree or how to author the animation? I know there are both right and left walk/run animations included with the mecanim tutorials and demo here. That also goes over how to set up the blend tree.
     
  3. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    I have a set of tutorials which includes converting a walk animation to a turn animation. It's very rough, ie simply rotating the root of the spine and moving it sideways, but it might be enough to get you going.

    I just realized you already know about mine from that previous thread, so sorry I can't help further. Perhaps check out the BlenderArtists site.

    If you did look at my Turn Right tutorial and couldn't follow it can you post a comment so I can fix it? I'm fairly new to making tutorials in this subject area.
     
    Last edited: Jan 14, 2014
  4. yvanbroeck

    yvanbroeck

    Joined:
    Mar 20, 2013
    Posts:
    28
    Don't worry mate, nothing wrong with your tutorials. I have a low-poly human model that I got from Blendswap, got it rigged and animated both the walk and idle animation. I did try your tutorial but didn't get the desired effect I wanted because of the more advanced leg model.

    Just out of curiosity: is it really necessary to have the walk left and right thingy for a multiplayer FPS? I mean, you use the mouse for the direction you're running in and the horizontal axis for strafing. So just a strafe left/right motion would work right?
     
  5. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
    To strafe I think you would need to create an actual moving sideways animation. Even if you use the mouse for turning, you would still have mouse movement set the Direction parameter in the blend tree instead of using the Horizontal axis.

    If the rig you had made it difficult to implement the turn right/left, is there a root bone in the rig? Usually everything else follows the root bone, so just rotating that should work. I used my base of spine bone effectively as the root bone, but of course I didn't have IK leg controls. Maybe in the next series.
     
  6. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    To do 1st person FPS style locomotion, you should do 8-way blending. That is, an animation for forward/back, strafe left/right, and each inbetween. If you don't do the inbetweens, the blending will look bad when moving in that direction. I would google "strafe animation" to see how they're done. Alas, there is no easy way to make animations.