// @TODO: Deprecated, remove me. void APawn::LaunchPawn(FVector LaunchVelocity, bool bXYOverride, bool bZOverride) { ACharacter* Character = Cast<ACharacter>(this); if (Character) { Character->LaunchCharacter(LaunchVelocity, bXYOverride, bZOverride); } }
void ASpringBoard::Spring() { SpriteComponent->SetSprite(UpSprite); bIsReady = true; ACharacter *Character = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0); Character->LaunchCharacter(FVector(0, 0, Character->GetCharacterMovement()->JumpZVelocity * SpringFactor), false, false); SpringSound->Play(); }