Get Character Movement?

I’m trying to recreate sprint functionality I made in Blueprint and I’m a bit stuck on getting the character movement. I’ve gotten the character with the following:

ACharacter* character = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);

But I am stuck as to where to find the character movement. I’ve searched through the movement methods but cannot find one to get the Character Movement itself. Any help/advice?

Bleh I feel stupid having missed that. Thanks. :slight_smile:

Edit: Seems like I missed it due to how Visual Assist was sorting the intellisense. Thanks again!

Just call GetMovementComponent() in your character class ? :]

Based on the line you posted, something like :

UCharacterMovementComponent* Movement = character->GetMovementComponent();

Shouldn’t the Character Movement Variable be inside the Character Base Class? If you have the character, you just need to get the variable.

character->CharacterMovement

Here, just tested (:

http://puu.sh/cl2bF/669c00cae1.png