Hey
What I am trying to accomplish is a simple double jump feature, just like in Devil May Cry, or any third-person game.
My implementation is to launch the player in the air after detecting a second jump press while in air.
The player is launching fine, and everything is working, but I can’t play a “Double Jump” animation in air.
Take a look:
void MyGameCharacter::DoDoubleJump()
{
eLog("DoDoubleJump(): ");
bDidDoubleJump = true;
bAllowDoubleJump = false;
PlayAnimMontage(DoubleJumpAnim);
FVector LaunchVec;
LaunchVec = GetVelocity();
LaunchVec.Z = 750.0f;
CharacterMovement->Velocity += LaunchVec;
}
float MyGameCharacter::PlayAnimMontage(class UAnimMontage* AnimMontage, float InPlayRate, FName StartSectionName)
{
USkeletalMeshComponent* UseMesh = GetPawnMesh();
if (AnimMontage && UseMesh && UseMesh->AnimScriptInstance)
{
return UseMesh->AnimScriptInstance->Montage_Play(AnimMontage, InPlayRate);
}
return -1.f;
}
Should be pretty straight forward, but the anim montage is not running. I think that is happening because in my Character Animation Blueprint’s state machine there is a “JumpIdle” node that runs when the player is suspended in air.
Is there any way to bypass that to activate the blueprint??
Thanks