As you can see from the video when I land the character moves about but no animation plays.
As you can see from the Console I am exiting and entering all states correctly.
In FreeLookState.Enter() you need to switch the Animator to the FreeLookState. This is easy to forget because it is the default state when we enter the game. It still needs to be set explicitly in Enter so that when we enter the state from another state, itâs brought back to FreeLookState
private readonly int FreeLookBlendTreeHash = Animator.StringToHash("FreeLookBlendTree");
Hello Brian,
I made the changes as per your post, and unfortunately it stays the same: -
Can I ask what the difference is as in the course video, I know you do not implement three different states, but we still do not put the animator in the Enter function when moving back from the jumping/falling state into the FreeLookState.
public class PlayerFreeLookState : PlayerBaseState
{
public PlayerFreeLookState(PlayerStateMachine stateMachine) : base(stateMachine) { }
We do, in fact, crossfade the animation back to the movement blend tree in the PlayerFreeLookState's Enter() method. This happened way back in the âAttacking State Polishâ lecture in the âMelee Combatâ section (I think. Iâm following code commits in the repo)
This line (from the repo)