Smoothly stopping an indefinite CameraShake?

I’m trying to use a camera shake for a headbob by setting the camera shake oscillation duration to -1 (indefinite) then calling it on keypress with ClientStartCameraShake, then stopping it with ClientStopCameraShake.

https://dl.dropboxusercontent.com/u/27624662/UE4Blueprints/HeadbobBlueprintWorkin02.jpg

It works, but ClientStopCameraShake doesn’t seem to use the Oscillation Blend Out settings inside the Camera shake asset, so when the player stops moving the camera simply snaps back to its default position.

I want it to blend smoothly back to position, how can I do this?

1 Like

I don’t know about that stopping it clean, but a possible solution could be to make a camera bounce that is just 1 shake, and then put it on a looping timer. When you want it to stop just clear the timer and the last shake will play out and finish smoothly.

Also getting this issue. Seems like if you use indefinite you can’t blend out of the camera shake. Hopefully its a bug that could be fixed.

I am experiencing this too, same issue was in UE3… aah, can’t belive it is in UE4 too… Epic can you please do something with it ? Stop node should really respect blend out time…

Same. Oscillation Blend out works fine but Blend in doesnt. Even if I set blend in to 3.0 it still snaps directly to shaking.

Here’s what you can do:
1: Update your project to UE4.12.5 (There is a boolean value in the stop camera shake that can be toggled to make it end smoothly.)
2: Make your camera shake last about half a second long (with fade in and out times of about 0.15 seconds) and create this blue print. I found this to be a very good solution.
Sorry If this response was too late-I had this problem for so long in my project. I can’t believe I finally solved it though.

thanks, this worked just fine.

Did you find the solution? i use sequence Camera Shake , and i have the same snaps back

I’m using Unreal Engine 5.1 with an Wave Oscilator Camera Shake Pattern, but i think this will work just fine on Unreal Engine 4, i’ve had this problem before and it’s really simple what you can do, for a headbob you dont need all of that indefinite Camera Shake oscillation duration.

Here is what i did:

Go to the camera shake Blueprint Class and on the top of everything there is a Boolean “Single Instance” so turn that on.

Then below the Frequency of every Vector you have the Initial Offset Type (If you are on Unreal Engine 4 it will appear only as Initial Offset) and for default it’s set on “Random” (EOD Offset Random if you’re on Unreal Engine 4) you will want to switch that for “Zero” (again EOD Offset Zero if you’re on Unreal Engine 4)

If you dont have any Blend in Time or Blend out Time you will want to change that for something like 0.2 or 0.5 dont forget to change the Oscillation duration to 1 again

And here is an quick example of what you can do to make this work.

If you want differet Camera Shakes for different walking types like Running or when the player stops, you can do this by stopping all the Instances of the other Camera Shakes and starting the other.
Like if you want a Running camera shake just after verifying if the players its moving verify if the speed its greater than the normal walking speed with a branch if its true then you are running so stop all the instances of the Walking Camera Shake and start the Running Camera Shake.

4 Likes

Using new input system it can be done without event tick. Same settings as yours (1 sec duration)

Thank you for this, it helped me resolve the issue I was having switching between my idle/walk/run camera shake behaviors!