Blend Tree stuck at half way when controlled by curve
Hi!
I have a setup (screenshot) where I have a float parameter called LeftFootZ
that is controlled by curves on all animations that move the character.
For example: Walk, Run and all other movements have this as a curve and they approximate the left foot's "forwardness" from -1 to 1. I then would like to use it for my 180 turn blend tree to detect and end at proper foot placements, but the blend gets stuck.
I suspect it has to do with the fact that even these 180 turn animations have the curve at a constant -1 or 1 value depending on which foot they start and end on. (Animations in RightFootTurns
have the value locked at -1, LeftFootTurns
have it at 1.) The reason of this is, that I can have different exit transitions based on which foot the turn was on.
Here's how I know it's stuck; Both lines coming from FootBlendTree
should actually be blue-ish on the screenshot because the value is 0. When I change the LeftFootZ
slider on the screenshot the line coloring doesn't change at all. It always goes to the top RightFootTurns
blend tree (-1). Even at runtime, I can see the LeftFootZ
value - always, incorrectly - going to, and - correctly - getting stuck on it for the duration of that animation. But it will never go to LeftFootBlendTree
. Fun fact, the animation in preview looks like it's always in a 50% blend. At runtime however it's always the RightFootTurns
(-1) one.
Here's what I'd expect: Player is walking, LeftFootZ
just goes from -1 to 1 and back. When I fire a trigger, and it transitions into RapidTurn.FootBlendTree
it sees for example a value of 0.5 and because It's closer to 1 than -1, goes to LeftFootTurns
which in turn increases the value to a constant 1. Then it will exit and continue to go from 1 to -1 and back because of the walk animation.
Now, this is all happening, but it never seems to consider LeftFootZ
and just goes into RightFootTurns
every single time.
Does anyone know anything about this phenomenon?
I'd much appreciate if you have any input!
Thank you in advance!
I have since got around this issue by replacing the FootBlendTree
with a gazillion transitions... typical. I'm however still very much interested as to why the Blend Tree couldn't handle this use-case.