state vs blendspace confusion

I have a setup that allows my 3rd person character using blendpsaces to go from idle to walk and back, and a blend that allows them to go from floating idle in ZeroG to “swimming” in zeroG with states to control when they in ZeroG or not.

I also have a layered blend on the arms so if they are rotating in either direction the corresponding arm will wave them around to simulate using arms to spin in place

I also use an IK setup that puts their hand on the walls when they swim too close to the wall while in ZeroG… this IK setup happens entirely in the anim Graph

The problem I’m having is that when the player leaves the wall and the Trace for the IK turns off, the player goes back to the swimming animation and because they are usually turning away from the wall, it blends to the “wave an arm” animation as they turn…

If I blend too quickly I get a sudden “pop” from the IK position to halfway through a turning arm wave but if I blend to slowly, the character will turn away from their IK hand too much and the arm ends up behind them.

I need a way to blend in-between the IK hand position to a neutral arm position, then only after that, blend to the usual swim state animations. But Im a little confused about to how add this extra layer of complexity. My initial thought was to use the distance between the capsule collider and the hit point on the wall where the player’s hand is… and blend back to normal as this increases or decreases… I really need some guidance, as my understanding was not as good as I thought.

OK, so I think the solution might be easier than I thought.

When I implemented another blend, that I thought would at least improve the issue, I came to realise that it was not just blending to an extreme position in the “swim turn” anim, but it was indeed just a simple IK pop…

So for the Blend by Bool, I swapped that out for a simple “if hit then go IK” and “if no hit then stop IK” - because even with a duration blend it was still doing popping… but now the bool is “if distance to wall is < x” then go to IK.

This allowed me to fine tune the point at which her arm would leave IK (while she was still closer to the wall)- I did still need to tweak the duration of the change, but I think I have a sweet spot.

New setup if anyone is interested: