fOOTSTEP ‘BREAD CRUMB’ SYSTEM

A look at the system I built to avoid dealing with AK notifies (or metasound event notifies) hanging off of animations. On previous projects, I really disliked dealing with animation tagging. It created problems when new weapons/items were added to the game, and also caused problems if anything changed with those animations. Hanging audio implementation off another disciplines implementation and systems also meant that we were always comprimised and subject to changes that affected animations.

An example of this is animation culling if a PlayerCharacter isn’t rendered on the screen (because they’re behind the player or obstructed by a wall). If the animation doesn’t play, the AK/Trigger metasound event never plays. This is bad for audio, because we likely want to be able to hear footsteps when we can’t see another player. By building my own system, not only did the system become more scalable and performant, but I also avoided issues like this and prevented changes and optimisations made for another discipline from affecting audio.

// overview

Provides a scalable method of implementing footsteps that is not reliant on animation or any other discipline. This is particularly important to ensure that audio isn’t broken by performance optimisation passes by other disciplines.

  • Audio_Movement component added to player character

  • Tracks stance of the player (which is updated as a delegate whenever the stance changes)

  • Sets float variable for step distance based on stance

  • Tracks number of UE units that the player has moved with breadcrumb logic

  • Uses structs to efficiently set variables for AK events and step distance within function

  • Selects correct sound based on perspective (1p or 3p)

  • Sets Ally/Enemy RTPC to make enemy footsteps louder and slightly more prominent in the mix

  • Selects surface sound based on physmat from player character (also alternative method using a line trace)

  • Handles water, both shallow and deep

  • Provides awareness of start/stop - allows bookend events

  • Easily able to add and handle more parameters. Essentially as simple as adding a new function (and I should really wrap up each of these pieces of logic as their own functions!)

Previous
Previous

Splines // Ambience Subsystem // Awkward shapes

Next
Next

Metasound gunshots