How to move the character while jumping?

Hey guys!

First of all: sorry when i put the wrong forum. :slight_smile:

I’m pretty new to the Unreal Engine 4 and moved from Unity3D (some difficulties here and there, but overall i make good progress ^^).

My question is: how to move the character while jumping?

I made my character completely in C++. No blueprints were used. My code for jumping looks like this:


void AFPSCharacter::OnStartJump()
{
	bPressedJump = true;
}

void AFPSCharacter::OnStopJump()
{
	bPressedJump = false;
}

Does anyone know the answer? I’m thankful for every single answer!

Sincerely

//EDIT: Found the problem. I searched around the ‘CharacterMovementComponent.h’ and found ‘AirControl’. I need to set this to 1, so i have aircontrol. 0 (default) means no aircontrol.

Simply write:


CharacterMovement->AirControl = 1;

in the constructor of your character. :slight_smile:

Just in case you didn’t know: AirControl is a float, so you can set values between 0 and 1 too, to enable a little control, but not too much.

I didn’t know actually. Thanks for the note!

Where do you place the characterMovement->AirControl = 1? I cant find the correct location to place it