[C++]How to get my CharacterMovement?

Hello
I have MyProjectCharacter. How can I get CharacterMovement?
i use this command and I don’t know, that’s next?
AMyProjectCharacter::GetCharacterMovement;

I want to set new max speed from code.

Hey Vodoo_Magick,

GetCharacterMovement return the UCharacterMovementComponent which is applied to your character.
From there you can access and set specific variables which help you configure your movement.

Maybe the API helps you

Unreal UCharacterMovementComponent API

Greetings

I know it. But I don`t know the name of CharacterMovement component. How can I access it? I wanna get something like this:
AMyProjectCharacter::GetCharacterMovement;
CharacterMovement->MaxWalkSpeed = 600;

I did it. I should just:

 GetCharacterMovement()->/*Do what you want*/

Thanks for help!

You could store that in a variable.
GetCharacterMovemtn just returns a Pointer to the CharacterMovement but the expression itself doesn’t do anything if you don’t store that pointer somewhere.

auto CharacterMovement = GetCharacterMovement();
will do the trick.

Or just GetCharacterMovement()->…;

Greetings