Ali Şahan Yalçın
DocsUsing it in Blueprint

Blueprint

Using it in Blueprint

The component, the event, and the context. Read this before the node reference.

Nearly everything you do with this plugin goes through one component and one event.

Getting the component

The Footstep Component sits on your character. From inside that character Blueprint it is in the components list, so drag it into the graph.

From anywhere else, use Get Footstep Component with an actor:

code
1
2
3
Get Player Character
  -> Get Footstep Component
  -> Set Footstep State

It returns nothing if the actor has no component, so check it is valid before using it on an arbitrary actor.

The On Footstep event

This is the extension point. It fires for every footstep, after the surface has been found and the database has been searched, and before any sound is played.

Select the component, scroll to the bottom of its details, and press + next to On Footstep.

code
1
2
3
4
On Footstep (Footstep)
  -> Break Footstep Context
  -> Location, Surface, State, Normal, Hit Actor ...
  -> your logic

The footstep context

Everything the plugin worked out arrives in one struct. Break it and take what you need.

PinWhat it is
Footstep ComponentThe component that made it
StateThe state it was evaluated with
Foot TagWhich foot, from the notify
Foot Bone NameThe bone it traced from
SurfaceThe physical surface under the foot
LocationWhere it landed
NormalSurface normal at that point
Physical MaterialThe material hit, if there was one
Hit ActorWhat was stepped on. Useful for moving platforms.
Hit ComponentThe component that was stepped on
Hit SurfaceFalse means the foot found nothing, like stepping off a ledge
EffectsThe whole effect set the database matched
Found EffectsFalse means no database had a match
SoundThe sound that was picked, already loaded
Volume MultiplierFinal volume, database times notify
Pitch MultiplierFinal pitch, already randomised
Locally ControlledTrue for the player's own character. The check for first person only effects.
From ReplicationTrue when it came over the network instead of being worked out here
INFO: Sound can be empty even when Found Effects is true, if the asset was still loading. The plugin plays it as soon as it arrives. This only happens on the very first footstep on a surface, and turning on Preload Assets On Begin Play avoids it completely.

Three ways to add your own logic

Pick by how wide it should apply.

You want it to happenUse
On every footstepOn Footstep event
Only on certain surfacesA Footstep Action on those rows
Only under your own conditionsShould Play Footstep to reject the footstep entirely

A Footstep Action is usually the better answer for anything surface specific, because it lives on the row and you never write a "was this grass" check.

Turning the built in playback off

The component plays the sound, particle and decal by itself. Three checkboxes turn that off:

  • Auto Play Sound
  • Auto Spawn Effect
  • Auto Spawn Decal

Turn them off and do it yourself in On Footstep. The picked sound and the whole effect set are still handed to you, so nothing is lost.

If you only want to change some cases, leave them off and call Play Footstep Effects with the context for the ones you did not want to change.

Where to go next