How do I move an NPC with CharacterController in C++?

Figured this one out on my own. My animation was using root motion, but I hadn’t set up the blueprint properly. However, I did find the correct workaround which I’ll leave here in case someone needs it later:

// find out which way is forward
const FRotator Rotation = Controller->GetControlRotation();
const FRotator YawRotation(0, Rotation.Yaw, 0);
    		
// get forward vector
const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
    		
float Value = 1.f;
AddMovementInput(Direction, Value);

This code is from the third person character sample and works just as well for non-player characters. the Value field just has to be something normalized from [-1,1].