How do I control a sound's volume based on speed?

Hi,

I’m currently making a lightsaber (for the fun of it), but I’d like to make it so it plays a looping sound when it’s moving. To be specific, however, I’d like the sounds volume to be set based on movement (and perhaps pitch too). So, the faster the saber moves, the more intense the sound is.

How would I achieve this in blueprints? I should probably note that I’m attaching the saber to the character through the level blueprint and currently just have the sounds playing by having them attached to the saber itself as a blueprint.

Thanks in advanced!

u can create a location or transform variable (that holds the lightsaber location/transform) inside the lightsaber/player class, and set it to update each let’s say 0.2 seconds (just an example), but before each update it will check the difference between new/old and set the volume/pitch value according to that comparision.