when you mention current direction for animation, you meant, what is the condition for select certain animation in the animgrah/event based in the character direction ?
using C++ is quite simple, you just need to extract the current player controller rotation normalized. if you want to get the absolute control rotation vectorized data:
float JoyRight, JoyUp;
FVector X(FVector::ZeroVector);
FVector Y(FVector::ZeroVector);
FVector Z(FVector::ZeroVector);
const FRotationMatrix R(Controller->GetControlRotation());
R.GetUnitAxes(X, Y, Z);
//or...
//X = R.GetScaledAxis(EAxis::X);
//Y = R.GetScaledAxis(EAxis::Y);
//Z = R.GetScaledAxis(EAxis::Z);
PCOwner->GetInputAnalogStickState(EControllerAnalogStick::CAS_LeftStick, JoyRight, JoyUp);
//current controller direction
FVector Direction = ((JoyRight* X) + (JoyUp* Y)).Normalize();
…if you use BP, the animinstance offers a const direction function with a float output. based on that they use a custom blendspace for the direction animations.