Search Unity

Question Need help for simple blend tree

Discussion in 'Animation' started by mfatihbarut, Apr 9, 2021.

  1. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,059
    Hi all,
    I need help to build a simple blend tree.
    I have 3 animations turn right 90 degree turn left 90 degree and idle
    And I want to blend them using turn velocity (velocity.y) as far as I know
    The problem is I couldn't achive to transfer velocity.y value or turn angle to blendtree parameter successfuly
    I how can I do it?
     
    Last edited: Apr 9, 2021
  2. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    I'd just pass a value between -1f (turning left) and +1f (turning right) to the blend tree. Idle would be 0f. You could make the value as angle/90f if you wanted better blending. Not sure why you need velocity.y but I'm sure you have a good reason for the effect you're going for. :)
     
  3. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,059
    how exactly can I do it?
     
  4. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,251
    How do you get input from the user to turn your model left or right?
     
  5. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,059
    That is the point where the problem begins.
    It is navmesh agent and it is driven by AI, I just need it to move its legs when it turns around 1-360 degrees
     
    Last edited: Apr 15, 2021