AnimationBP->MovementDirection seems to be a bp variable which is very hard to set in C++
would recommend creating your own AnimationInstance in C++ with the MovementDirection variable, then casting to it is not a problem
UCLASS()
class UMyAnimInstance : public UAnimInstance
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FVector MovementDirection;
};
MyAnimation = Cast<UMyAnimInstance>(AnimInstance);
if(MyAnimation )
{
MyAnimation->MovementDirection = Axis;
}