What is the best/cheapest way to sync the footstep sounds to match up exactly with the player’s movement speed?
It really annoys me to see the player’s footsteps slightly out of sync with the sound.
I was thinking of some complicated footplanting/raycasting system, but it just feels like too much work for what should be an easy problem.
I believe you could calibrate it manually for normal walkspeed then scale based on the ratio of the current walkspeed to the calibrated walkspeed.
Not sure how exactly it would be calibrated, but if you can find a way, well there you go.
I think what EmeraldSlash said will probably be your cheapest option. I’ve run into the same type of issue when improving the default Animate script: by default, the speed of the character only lines up with how their foot falls for the default character height.
In the end, what worked for me was to set 2-3 different walk speeds to test the duration against. Once I found a coefficient that worked for all three speeds, I knew it was perfect.
Hmmm, the other thing I just thought of is that that same Animate script may let you add an if branch to the function that manages the looping of the individual animations. There’s a lot that I still don’t understand about it personally, but there could be a way to figure out which keyframe a footfall happens on and send out a “Stepped” signal each time.
Rename the keyframes on your walk animation and fire the footstep sound on KeyframeReached