- Home /
Question by
Ay-mak · Feb 21, 2019 at 09:38 PM ·
animationparametersblend tree
Blend tree parameter
What are those threshold numbers from the animation blend tree ? Why is it 0.6385 and not 0.5. How can I link the player velocity to those values ?
Comment
Best Answer
Answer by jstopyraIGG · Feb 22, 2019 at 01:15 AM
You need to create a float parameter in the parameters tab of the Animator. You then need to set that float value from a script.
//Animator is the animator reference
//navmeshAgent is reference to the nav agent
//playerVelocity is the name of the float parameter you created in the Animator (this can be anything, but needs to match the name in the Animator)
Animator.SetFloat("playerVelocity", NavmeshAgent.velocity.magnitude);
Then, in your blend tree, you can set your float parameter you've previously created as the parameter used for blending.
The threshold values get generated automatically, but you can change them to whatever meets your needs.
Your answer
![](https://koobas.hobune.stream/wayback/20220612192209im_/https://answers.unity.com/themes/thub/images/avi.jpg)