Custom Gravity c++ How can i access the MovementComponent functionality from Character class?

Hello,

since 5.4 the custom gravity functionality is accessable in BP via the character class and its MovementComponent.

I want to do the same thing in c++ and running into the trouble that i cant access the movement component.

			GetCharacterMovement()->SetGravityDirection(GravityDirection);

is not working, output error returns:

2>AxCharacter.cpp(190): error C2027: use of undefined type 'UCharacterMovementComponent'
2>...\Engine\Classes\GameFramework\Character.h(25): note: see declaration of 'UCharacterMovementComponent'

So can i access the character Movement Component from a character class derived script?

Use of undefined type means that you need to #include the header .h file where the type is declared.
In this case it would be #include "GameFramework/PawnMovementComponent.h".