Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved Remove Player Twists From Hips In Animations

Discussion in 'Animation' started by TestUser001, May 29, 2020.

  1. TestUser001

    TestUser001

    Joined:
    Jun 22, 2018
    Posts:
    5
    I have 8 walk animations (walk forward, backward, left, right, etc), I used two avatar masks called "Lower" and "Upper", Everytime i walk the hips twists the player to the direction of the legs. (More of the problem is below)

    upload_2020-5-29_15-28-5.png

    upload_2020-5-29_15-29-12.png

    I made an Animation Layer that uses the "Lower" avatar mask, which holds a blend tree containing all the walk animations. The "Lower" Avatar Mask has the spine on (on purpose or else the player floats and his back bends)

    I made another Animation Layer that uses the "Upper" avatar mask, which holds the idle animation for a gun.

    The problem is that everytime i walk (using the "Lower" Animation Layer) it twists the whole player the other way and i want to remove that so it only moves the legs and not the hips.

    Video: https://imgur.com/a/OGLCOFp

    Basically i want to split the body so the upper has its own animations and the lower has its own animations aswell without the lower body twisting the hips for the upper body.
    upload_2020-5-29_15-40-24.png
     
  2. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    to me this looks like the root transform rotations are not aligned. (is this a blend tree?)
    try adding offset (and baking)
    https://docs.unity3d.com/Manual/class-AnimationClip.html

    but I think it's not possible that the lower body hips won't be affecting upper body.
    might need zero rotations on upper body spine1 and/or a script adjusting spine1 rotation in lateupdate.
     
    TestUser001 likes this.
  3. TestUser001

    TestUser001

    Joined:
    Jun 22, 2018
    Posts:
    5
    Haha thanks, i removed all spine rotations from the leg animations and now it stopped twisting too much. Although it still twists a little, but it doesn't really matter to me.