Blend Tree animation bug?

Hello,

I use the blend tree to change animation when I change direction with my character.

On the y-axis everything works correctly, the animations change when the value of y is lower than 0 or higher than 0.

When I move the character to the left the animation is played as it should be but when I want to go to the right it is the left animation that is played until the value of x is greater than 0.90. When x is higher than 0.90 the right animation is played.

Here is how I get the values of x and y (I use the new input system).

private void InputMovementReadValue()
    {
        Vector2 inputVector = playerInputActions.Player.Move.ReadValue<Vector2>();
        inputX = inputVector.x;
        inputY = inputVector.y;
    }

Thanks in advance for your help.

I solved the problem by changing the blend type from 2D Simple Directional to 2D Freeform Directional.

I still don’t understand why it worked perfectly on the y axis and not on the x axis.

2 Likes

I don’t care if I am being a necromancer, Beshi, after over 2 hours of searching, I finally found this solution.
This solved my issue.

My left direction was only active if my x axis was less than or equal to the left value, otherwise, I was was getting by right, positive x animation.

(Hopefully thus wording will make it more prone to showing up in Google searches for future --masochists-- learners

1 Like