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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

does anyone know how to fix this glitch?

Discussion in 'Animation' started by Promind, Sep 15, 2015.

  1. Promind

    Promind

    Joined:
    Sep 15, 2015
    Posts:
    6
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,534
    In the second picture, it looks like the rig isn't set up right. The leg bones need to be children of the root/hip bone, and the foot bones need to be children of the leg bones. Generally speaking, if you see red on the avatar's Body configuration, animation isn't going to work.
     
  3. Promind

    Promind

    Joined:
    Sep 15, 2015
    Posts:
    6
    Even if I fix the hierarchy of the bones the error still remains...
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,534
    After you fix the hierarchy, does the automapping work? Is the avatar all green, or are the legs still red?
     
  5. Promind

    Promind

    Joined:
    Sep 15, 2015
    Posts:
    6
    this is the result after i forced the hierarchy in unity, avatar is all green, but the character is glitched
     

    Attached Files:

  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,534
    It's getting there -- all's green now! :)

    When you inspect the animation to import it, does it play correctly in the Inspector view? If not, make sure you're not masking out the legs.

    If it plays correctly in the Inspector view, then maybe the problem is with your animator controller. Your base layer shouldn't mask out anything with an avatar mask.
     
  7. Promind

    Promind

    Joined:
    Sep 15, 2015
    Posts:
    6
    if you know how to fix can you explain me the steps that i have to do? im noob
    if you want i can pass you my project even blender model...
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,534
    Try these steps:
    1. Click on your blender model.
    2. In the Inspector view, click on the Animations tab.
    3. Click on your clip in the list.
    4. Press the Play button near at the bottom of the Inspector view:


    If the animation does does not play correctly, expand the Mask foldout. Make sure everything is the default and that it's not excluding parts of the model.

    If the animation clip plays correctly, then your animation imported into Unity correctly. If this is the case, then:
    1. Double-click your animator controller to open the Animator view.
    2. Select the base layer. Make sure it does not have an avatar mask assigned to it.
     
  9. Promind

    Promind

    Joined:
    Sep 15, 2015
    Posts:
    6
    still the same problem, i followed yuor instruction but nothing have changed.
    But, in the inspector i can see there is a piece of right foot that follow the movement of left foot in all animations...
    in blender no.
    I dont understand why...
     

    Attached Files:

  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,534
    In the avatar configuration, make sure all the bones are mapped correctly.
     
  11. Promind

    Promind

    Joined:
    Sep 15, 2015
    Posts:
    6
    I fixed it, it was a blender problem...thank you :)