Calculate direction node STILL inverting

Hello!
I’m attempting to set up a killer whale to maneuver around a swim volume in Unreal 4.27, but I am still dealing with an issue with the calculate direction node: whenever the character turns over 90(?) degrees, the node spits out an inverted value, causing the wrong animation to play (turning left instead of turning right or vice versa). Is anyone familiar with this issue and how to fix it?


Here is my animation graph again. Last time, I was given the advice that velocity is being pulled from the global space rather than the local space, but I am still not understanding what this means. Can someone please help?