Adding Varied Footstep Sounds | Tech Discussion
This wil be a short and simple tech discussion, but I think the solution I came up is quite useful for anyone wanting to add footstep sounds to their 3rd person game in UE4.
The desired features:
- Footsteps play at the right time in all animations
- Footstep sounds play randomly so that the player doesn't have to hear the same sound over and over again
- The volume of the steps can be adjusted per step, based on given animation
Here is how I made it work:
In order to play the sounds at the right time in the animation, I created an Anim Notify called AN_FootstepSound. To get the timing right, so that it played rythmically, for each locomotion animation I found the frame where the first footstep landed and checked the percentage value at that point.
I then added 50% to that to get the location of the next footstep.
Setting up it up this way rather than trying to line it up with when I thought the character's foot hit the ground in the animation produced a more consistent sounding result.
Next, in order to play the sound randomly, I simply switched on a random int within AN_FootstepSound, playing 5 different footstep sounds I had.
Lastly, so that I could vary the volume with each step, I created a variable in AN_FootstepSound and toggled Instance Editable, plugging it into the volume multiplier paremeter of the SpawnSoundAtLocation calls.
This way I was able to edit the volume of the steps per-instance of AN_Footstep sound.
This proved quite useful for times like when, during the end of an attack animation, the character adjusted their stance lightly. In that instance I was able to quite easily decrease the volume for those smaller steps.
Here is how it turned out:
Author: Reilly da Silva
Files
Get Mythicism
Mythicism
Status | In development |
Author | Arcane Studios |
Genre | Action |
Tags | 3D, Action-Adventure, Dungeon Crawler, Fantasy, Singleplayer, Third Person |
More posts
- DOT Particle Effect Not Working In Release Build | Tech DiscussionJun 24, 2022
- Tech Discussion | Boss Post MortemJun 23, 2022
- Ranged Enemy Aiming Problem | Tech DiscussionJun 17, 2022
- A Problem With Blade Trails | Tech DiscussionJun 10, 2022
- Tech Discussion | Boss BehaviorJun 10, 2022
- How To Edit Animation Sequences (Additive Layer Tracks) In UE4 | Tech DiscussionJun 03, 2022
- Tech Discussion | Altar System and Player levelingMay 23, 2022
- Tech Discussion | Save SystemMay 23, 2022
- Designing A Souls-like Block Mechanic In UE4 | Tech DiscussionMay 14, 2022
Leave a comment
Log in with itch.io to leave a comment.