How to access CharacterMovementComponent into Child Character Class to implement Charge-Jump Logic?

First of all, I’d like to thank all of you for clicking on this question.

I am a beginner who has just started studying Unreal Engine C++.
and I ask for your generous understanding that the quality is poor because it is the first question left in the community.

My final goal is to implement the Charge-Jump Logic in UE5 without using ACharacter::Jump() and ACharacter::StopJump(). because my game needs logic that the character stays still until the gauge is charged, and the character moves when the gauge is charged as much as the player wants.

The Jump Gauge, Gauge Reset, and Logic call works fine, but ACharacter::LaunchCharacter does not work. I was looking for a way to make LaunchCharacter work, so I was trying to figure out about CharacterMovement, but this was beyond me. I didn’t have access to the CharacterMovement and I don’t even understand what the functional form of this is.

So, What I want to ask you is

  1. How to access the trigger of ACharacter::LaunchCharacter, CharacterMovement.
  2. If I can’t use LaunchCharacter, what is another way to give the character ZVelocity to jump momentarily?

// This is My ChargeJump-Logic, Not Same bPressedJump between sPressdJump.

void ASlime::ChargeJump()
{
UE_LOG(LogTemp, Display, TEXT(“JUMPBUTTON IS PUSHED”));
JumpCharge = 0.0f;
sPressedJump = true;
}

void ASlime::JumpGaugeCharge(float DeltaTime)
{
JumpCharge = 0.0f;
if (sPressedJump)
{
JumpChargeTime += DeltaTime;
JumpCharge = minJumpVelocity + JumpChargeTime / GaugeChargeSpeed;
UE_LOG(LogTemp, Display, TEXT(“JUMPGAUGE NOW CHARGING… :: %02f”),JumpCharge);
if (JumpCharge >= maxJumpVelocity)
{
JumpCharge = maxJumpVelocity;
sPressedJump = false;
}
}
}

void ASlime::LaunchSlime()
{
UE_LOG(LogTemp, Display, TEXT(“SLIME LAUNCH!!”), JumpCharge);
const FVector ForwardDir = GetRootComponent()->GetForwardVector();
FVector launchVelocity = ForwardDir * FVector(0, 0, 1) * JumpCharge* GetCharacterMovement()->JumpZVelocity;

LaunchCharacter(launchVelocity, false, true);
JumpStateReset(JumpCharge);

}

void ASlime::JumpStateReset(float Delta)
{
Delta = 0.0f;
JumpChargeTime = 0.0f;
sPressedJump = false;
}


// This is the function built into the Unreal Engine API, called ACharacter::LaunchCharacter.
void ACharacter::LaunchCharacter(FVector LaunchVelocity, bool bXYOverride, bool bZOverride)
{
UE_LOG(LogCharacter, Verbose, TEXT(“ACharacter::LaunchCharacter ‘%s’ (%f,%f,%f)”), *GetName(), LaunchVelocity.X, LaunchVelocity.Y, LaunchVelocity.Z);

if (CharacterMovement)
{
	FVector FinalVel = LaunchVelocity;
	const FVector Velocity = GetVelocity();

	if (!bXYOverride)
	{
		FinalVel.X += Velocity.X;
		FinalVel.Y += Velocity.Y;
	}
	if (!bZOverride)
	{
		FinalVel.Z += Velocity.Z;
	}

	CharacterMovement->Launch(FinalVel);

	OnLaunched(LaunchVelocity, bXYOverride, bZOverride);
}

}