Trying to make indefinite camera shake stop looping

Endersky1
Mon, 28 Oct 2019 15:12:17 +0000
Cinematics & Media

I made a cam shake for my sprint so that if it is sprinting it’ll play indefinitely until the movement is lessened. I have tried to figure this out but I have no idea, I made my camera shake a tsubclassof and I need a pointer, how should I get around this, thank you in advanced!

if (GetCharacterMovement()->MaxWalkSpeed == (OriginalWalkSpeed * SprintMult)) {
			GetWorld()->GetFirstPlayerController()->PlayerCameraManager->PlayCameraShake(CamShake, 1.f);
		} else {
			GetWorld()->GetFirstPlayerController()->PlayerCameraManager->StopCameraShake(CamShake, true);
		}

2 posts - 1 participant