AND… I FIXED THE TARGETING ISSUE
My dummy brain, for god knows what reason, set this value up without the ‘!’ sign:
// Checking if the target is valid, based on whether he has health or not:
public bool IsValid() => !Health.IsDead();
This one comes from lecture 16, under ‘Target.cs’.
[PROBLEM]
Now it’s time for me to go and understand why he’s extremely slow (during the targeting state), and why my movement animations are currently not working (neither in the freelook nor the targeting state… he’s moving, but no movement animation is being played in either states, and for the targeting state, he’s extremely slow, and I’m taking a wild guess that the issue is relevant to world and local coordinates or something, I don’t know tbh… probably taking the normalized vector, not the full speed number, and that’s why he’s so slow)
Oh, and if he’s in a fight in targeting state, he tends to back off instead of fight for some reason… I’m still in Lecture 18
Edit: After a bit of analysis of the blend tree, I realize the movement blend tree relies on ‘forwardSpeed’ over ‘FreeLookSpeed’, hence the animation doesn’t even play to begin with, because the blend tree variable isn’t even adjusted. I then change the variable it seeks to ‘forwardSpeed’ in code, and the issue of the value maxing out at 1.0f is still there, so now it’s a bit of a nightmare…
Edit 2: After a bit more analysis, I learned that the blendTree factor name can change, so I changed the ‘forwardSpeed’ reliance for the blend tree to ‘ForwardSpeed’, the new variable we created, and that got my freelook animations to work as well. HOWEVER, the problem that these values max out at 1.0f is still driving me nuts, I think it’s all I need to know for now
Edit 3: I fixed the ForwardSpeed issue by being a bit too smart… I took the old maximum values and converted them to a fraction that does not exceed 1.0f, which is what the normalizer gives out. Works beautifully now (not for the targeting state yet though, time to investigate that)
THE MAIN PROBLEM THAT STILL REMAINS, IS THAT MY CHARACTER MOVES INCREDIBLY SLOWLY IN THE TARGETING STATE (Sorry for the caps lock, just highlighting it)