How to move an actor with an animation in C++?

I want to have an actor move to another location using a running animation, but I have no idea how to do that, much less in C++, because I’m trying not to use too much scripting. Any help would be appreciated.

Thanks!

Hi, could you explain a bit more what you want? So do you want to move the player or an AI? And is it a character that you want to move or a pawn or an actor? If its not an character do you have capsule collision as root? And do you have a build in movement component on the actor and if so which?

For animations you could inherit from UAnimInstance.

It’s a board game with characters who are the pieces. I want the player to be able to move them across the board. Each unique piece inherits from a parent piece, which inherits from the actor class. I’ve set up a scene component to be the root of the pieces but I could easily change it to a collision capsule, which is attached to the scene component. Everything else is attached to the capsule component. I don’t have a movement component on the actor.

Ah ok, then it seems to me that you need to write your own movement from scratch.

For example if you have an AI that inherits from character class, then you could just use MoveTo and it would move to the specified location (using the navmesh). Same for pawn that has FloatingPawnMovementComponent (may also work with other build in movement components) and Capsule collision as root.

Since you use actor as base class I don’t know whether or not you can use any of the build in movement/pathfinding for that, since actor cannot be possessed by an AI controller.