How to use the Player Controller class in C++

Depending upon what you’re doing, the CharacterMovementComponent has a lot of built in functionality that is helpful. Although, if you don’t need all of it’s functionality, it can be a total pain. When working with it, I spend more time fiddling with booleans than actually coding. But, if you need those built in features right out of the box, it’s great.

By default, it’s contained in any ACharacter class, and all you have to use is GetCharacterMovement() to retrieve a pointer.

Create a custom controller shouldn’t be too difficult either, just create a new class from the C++ wizard in the editor, derive from CharacterMovement, and bam. I don’t know exactly how you would override ACharacter’s already set MovementComponent, though, since it is private.