Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Problem with Blend Tree and animation

Discussion in 'Animation' started by giotta, Jan 17, 2021.

  1. giotta

    giotta

    Joined:
    May 31, 2015
    Posts:
    46
    Good morning, I have a question to ask about unity's blend tree animator. I bought a package of animations from the asset store containing the classic animations to shoot the character 90 and 180 degrees, respectively right and left. When I go to do the blend tree of these animations, with the idle state, in one of these 4 animations, I don't know why, for some animation frames, my character changes direction for a few moments, and then back to the correct position. Is it possible to be a problem in animation? Does anyone have any idea why with 3 animations it works perfectly, while in one does this artifact ?
    I don't really understand what the problem might be
     
  2. giotta

    giotta

    Joined:
    May 31, 2015
    Posts:
    46
    Does anyone have any idea? Why do the two animations (taken individually) work well, and once mixed they produce that artifact?
     
  3. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    115
    it is probably the root transform rotation that causing it. if character is looking left, usually the root (hip) rotation is different than looking right. if you want blending without root rotation changing, character should have same orientation.

    try baking root transform rotation (and adjust offset if needed) see here
     
  4. giotta

    giotta

    Joined:
    May 31, 2015
    Posts:
    46
    In the meantime, thank you for your answer. I tried to lift the V on Bake Into Pose(under Root Transform Rotation) and the artifact disappears. I noticed, in the file called Root in the animation, on Rotation x=-89.98 and in all other animations it is -90. Is that the problem? Is it a root import problem in the animation? Out of 25 animations, only in this one gives problems when used in blends. Thank you again and sorry for my bad english
     
  5. bobadi

    bobadi

    Joined:
    Jan 3, 2019
    Posts:
    115
    I have a feeling this has got to be because of the interpolation, and if I get it right, it always takes the shortest path (smaller angle)
    more about this here

    experimenting with the root transform rotation offsets should give some values that work
     
unityunity