Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Horizontal movement animations moving character in opposite direction.

Discussion in 'Animation' started by Xenon42, Jul 10, 2018.

  1. Xenon42

    Xenon42

    Joined:
    Aug 31, 2016
    Posts:
    11
    I've been trying to work out how to handle transitions from one state to another, as well as how to make animations impart motion on an animated character. I've made up a basic character in Blender, which has animations for running forwards, backwards, and strafing left and right. It also has an animation for performing a small standing jump.

    I'm trying to make this test character walk in any horizontal direction, and transition into a jump at any time. I've set up a state machine to handle this, but I must have missed something, because I've run into a weird unintended behaviour.

    The character's run animation is moving the character backwards instead of forwards. I don't know why, as I definitely animated the character's root to move forwards. The same thing happens with the backwards run animation, as well as the left and right strafe animations. They all cause the character to move opposite to the intended direction.

    This problem doesn't occur with the jump animation. The character rises and falls just fine, so I have no idea why the running movement isn't working as intended. Does anyone know what could be causing this, and how to fix it?
     
  2. unity_Y9-Qu4dmill45A

    unity_Y9-Qu4dmill45A

    Joined:
    Jun 4, 2018
    Posts:
    18
    Hi,
    Which Blend Type are you using?
    Print parameters you are passing to Blend Tree to see if issue comes from it and look at Blend Tree motions to see if they correspond to parameters you give.
     
  3. Xenon42

    Xenon42

    Joined:
    Aug 31, 2016
    Posts:
    11
    Ah, never mind. I fixed the problem myself.

    The problem was in the "root transform rotation" section of the animation import. I had all the animations set to Based Upon: Root Node Rotation, because it was the default and I assumed it didn't need to be changed. But for some reason, this was inverting all horizontal movements (I confess I don't exactly understand the difference between the Root Node and Original options in the animation import tab). Having now switched the Based Upon to Original, the animations now work perfectly.

    Thank you for being my rubber duck.
     
  4. unity_Y9-Qu4dmill45A

    unity_Y9-Qu4dmill45A

    Joined:
    Jun 4, 2018
    Posts:
    18
    You're welcome :)