• News

• Industries

• Learning & Support

• Community

• Marketplace

# Constant Camera Shake with Varying Intensities

I want my follow camera to shake anytime my character is in motion. I also need it to shake more violently the faster my character moves. It seems to me that this isn’t possible with the Client Play Camera Shake node in Unreal Engine 4.14. Is there a way to accomplish this?

Add camera arm, place camera on it. Enable lag for camera arm, set it to quite fast response ie, it needs only smooth a tiny bit of movement, not make it very smooth.

You need to create random vector along axis of camera arm, and in some small cone. For that you need to do some vector math, i tried to write it down, but without unreal editor is hard, also it would be quite hard to understand what i am explaining.

I hope you get the idea:

• find direction vector from camera arm to camera location
• rotate it to the side a bit (by 2-3 degrees) so it does not point exactly at camera. You can rotate it around camera arm right vector here
• spin it by random rotation of -180 to 180, Now spin it around Z axis of camera arm
• this way you should have random vector in cone around direction of camera.
• find look at rotation of that cone vector ie: from [0,0,0] to that vector value
• you have random rotation that will rotate camera correctly
Apply that to camera arm, rest will be done by arm lagg and approximation

If I needed this I’d prototype first to make sure it works & its what I really want
Why not, create a series of CameraShake BP’s from slow to aggressive, 5-10 etc.
Then get the player’s Velocity and scale it to pick the most appropriate Shake…
Or since you must have Input events tied to player speed already tap into that.
I’m sure Nawrot’s example is superior, but I’m afraid I couldn’t follow any of it.