Move Character directly

TL;DR: how do I make a character move with animation without NavMesh?

OK, so I’ve been trying a few things unsuccessfully and my goal is pretty simple.
I want to mimic a Player controller in a non player controlled character. So specifically I’m just trying to get rotation and movement so far but no luck. I’m not looking to use NavMesh or anything complicated. I tried using a PlayerController and I’m able to send it fake input data via AddControllerYawInput for instance but it fails to update the rotation because there is no Player attached. Trying to use an AIController isn’t giving any results (using GetPawn()->FaceRotation() for instance). I’m sure there’s a simple way to do this but I’m still learning.

If you’re interested in my end goal it’s simply to record player input on the main character and feed it back into another NPC character.

I have a solution to my problem even though it’s not exactly what I was trying to do.

What I did:

  • Made a new custom AIController class.
  • Attached that AIController to my NPC.
  • Called AIController::MoveToLocation with AcceptanceRadius = 0, bStopOnOverlap = false, bUsePathfinding = false. bool bAllowPartialPath = false and the rest left as default.

No NavMesh was required but I added a call to SetActorRotation to align the rotation of the NPC to match each frame as the rotations from the player input and the MoveToLocation weren’t the same for really small movements.