So doing this lecture, I’m also having an issue with my camera not switching back to the FreeLookBlendTree. I hit tab to swap in, it changes cameras, removes all movement logic / animations as expected, but when I hit escape I’m stuck in a t-pose and the camera doesn’t swap back so what I gather is I’m successfully changing states, and when I change states I’m swapping from the freelook blend tree to the targeting blend tree but when I go to switch back I’m successfully changing states again but I’m stuck in the targeting blend tree. I’m also throwing the following warning:
I can only assume that means that it’s assigning the wrong int to the blend tree?
I’ve looked over the lecture resources to make sure my code matches and I can’t seem to find the error (plus my state driven camera object seems to be configured correctly). Here’s the relevant code assigning the int and playing the blend tree’s.
// variable assignment in PlayerTargetingState.cs
private readonly int TargetingBlendTreeHash = Animator.StringToHash("TargetingBlendTree");
// within Enter() of PlayerTargetingState.cs
stateMachine.Animator.Play(TargetingBlendTreeHash);
// variable assignment in PlayerFreeLookState.cs
private readonly int FreeLookBlendTreeHash = Animator.StringToHash("FreeLookBlendTree");
// within Enter() of PlayerFreeLookState.cs
stateMachine.Animator.Play(FreeLookBlendTreeHash);