So i have the following blend tree:
Then i have the following code:
Vector3 move = Target;
if (move.magnitude > 1f) move.Normalize();
move = transform.InverseTransformDirection(move);
CheckGroundStatus();
move = Vector3.ProjectOnPlane(move, m_GroundNormal);
m_inputMagnitude = move.magnitude;
m_TurnAmount = Mathf.Atan2(move.x, move.z);
m_ForwardAmount = move.z;
m_Animator.SetFloat("Forward", m_ForwardAmount);
m_Animator.SetFloat("InputMagnitude", m_inputMagnitude);
m_Animator.SetFloat("Turn", m_TurnAmount);
This sort of work but it has a few issues when walking backward it simply swift between the “backward and strafe state”
Can anyone help me out with how I might smooth this even more?