[Solved]How to get ismovingonground()

I haven’t used unreal engine since version 4.8 but I just recently got back into it and now I can’t seem to get ismovingonground() to work. I tried getcharactermovement and charactermovement->ismovingonground and it just comes back saying it is not accessible or pointer to incomplete class is not found.

void AMyCharacter::moveJump()
{
	if (CharacterMovement->IsMovingOnGround())
	{
		LaunchCharacter(FVector(0, 0, 300), false, false);
	}
}

this is the code for my jump function. I had the same issue with inputcomponent but for that I had to include a header file so I don’t know whether I have to include a header for this to work or whether I have to do something different

#include “GameFramework/CharacterMovementComponent.h”

gets rid of the error and

GetCharacterMovement()->IsMovingOnGround()

aside from that you can ignore those errors if it Compiles its fine.

Worked thank you!