Midair Forward Velocity Stop

I guess my question was jumping the gun a bit, I asked such a broad question. I know c++ but within the context of unreal its like a whole new language. I guess the first step I need to do is check if the character is falling?

I was trying to use the IsFalling character movement component. Its recognized, I included the header needed too. Just for a simple check was I was going to print the bool to my screen using a debug message, but it wont let me compile without initializing the IsFalling bool (which makes me scratch my head, why define something that is a check?)

Should I somehow assign this bool’s value to another variable, then print that variable?
But if I cant initialize the bool it wont let me compile, so I really cant assign its value anyways.

// Called every frame
void AShanesTestCharacter::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	
	//Checking and printing if falling.
	bool IsFalling;
	if (GEngine){
		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Blue, FString::Printf(TEXT("IsFalling: %s"), IsFalling));
	}
}
1 Like