This is setup in the AnimBP via a notify event, every time the enemy’s foot hit’s the ground during a running animation.
I’m trying to achieve this, the closer the Pawn owner is to the character the more power the amount on the camera shake.
I figured you would subtract the two distances…but i cant’ seem to get the rest of this equation figured out…or if I’m even on the right track.
After subtracting the two vectors then you need to get the vector length to get the float distance. Drag out of the subtract for a Length node(note there is no get in front of it)
I tried attaching a vector length in between but the set actor location and vector plus vector. It’s not making the shake amount go up because the distance is getting shorter…???
right so you need to figure out a couple of issues. You want to be able to set the close and far shake amount with some variable distance as well as clamping the values.
Maybe try something like:
divide the length by some distance value (this would be the distance at which you want the shake to start happening). Plug this into a clamp with 0 and 1 as min and max.
plug the clamped value into a LERP alpha input and then plug your close shake amount into the A input and the far shake amount into the B input.
Just realized i named the shake amounts oddly so it may be confusing, MinShakeAmount is for the closest shaking (0 distance) which will probably be the largest number