Camera Shake Scaling Based on Player Speed

Hi, I am very new to Blueprints. I just learned how to add camera shake to my character, however, the camera shake is constant no matter how fast the character is moving. Is there a way to get player speed and use that to drive scaling on the “Start Matinee Camera Shake node”?

Edit:Added Video to show the problem


Hey @ShieldUp, welcome back!

Try a % node! I just gave this a shot and it worked as intended. The Scale value will be filled with a number between .001 and 1.0! Just remember to put something tiny in the Normalize to Range Minimum, because you can’t divide by 0 :slight_smile:

Give that a shot and let us know how it went!


Hi! I tried the node set up you had, but it didn’t work for me…

Get the velocity or Last Update Velocity from the character movement component not the actor.
Also dont divide a normalized range by 600, since if the players running at 600cms then normalized to 0-1 then divided by 600 is going to be a scale of 0.0016

@ShieldUp Ah, I see. @Rareden Good catch. Idk why my brain let me do that twice.

So what you’ll do is you’ll want to grab your Character Movement component and drag it into the event graph. From there, drag off of it and get velocity, then drag off the vector and use “Get Vector Length XY”

image

This way it’s not just pulling from world X but also world Y so moving North/South and East/West give equal values.

Regarding your Max/Min, make sure you’re using your Movement Component’s max speed as a guide, because you seem to be moving somewhat slowly… or maybe it’s my imagination. But if you were to move slower you need to reflect that in your numbers.

Now regarding your actual shake, is this event playing constantly? If it’s only fired once it’s only going to get the velocity once, and if it is at the start of your movement it’s going to lock in very low.

Can you show where you’re calling the “Start Camera Shake”?

@Mind-Brain Thank you for the response!
I just tried the setup you showed, it’s still not working…

I believe my walking speed is set to default:
Screenshot - 2022-10-26 08.51.08

Maybe it has something to do with the Do once node here:

and here’s the camera shake setting for “Walking Camera Shake”: