# Trying to make indefinite camera shake stop looping

**URL:** <https://forums.unrealengine.com/t/trying-to-make-indefinite-camera-shake-stop-looping/457675>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, pointer, question\
**Created:** [October 28, 2019, 3:12pm UTC](https://forums.unrealengine.com/t/trying-to-make-indefinite-camera-shake-stop-looping/457675 "2019-10-28T15:12:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Endersky1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Endersky1](https://forums.unrealengine.com/u/Endersky1)\
**Post date:** [October 28, 2019, 3:12pm UTC](https://forums.unrealengine.com/t/trying-to-make-indefinite-camera-shake-stop-looping/457675/1 "2019-10-28T15:12:17Z")

</div>

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);
		}
```

---

<div class="post-metadata">

**Author:** ![Endersky1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Endersky1](https://forums.unrealengine.com/u/Endersky1)\
**Post date:** [October 31, 2019, 3:16pm UTC](https://forums.unrealengine.com/t/trying-to-make-indefinite-camera-shake-stop-looping/457675/2 "2019-10-31T15:16:28Z")

</div>

The solution is to use `PlayerCameraManager->StopAllInstancesOfCameraShake(CamShake, false);` instead of `StopCameraShake(CamShake, true);` because that one is for pointers and the stop all instances of is for tsubclassof which is what I’m using
