Open an animation sequence or skeleton to which you want to add footstep animation notifies or sync markers, and then open the Animation Data Modifiers window.
Add AutoFootstepAnimationModifier and set its properties.
Description of each property
- Path Filters
If the array is not empty, apply the modifier only to animations whose paths contain any of the strings in the array. This is useful when applying the modifier to a skeleton. - Foot Bone Names
Names of the foot bones to detect footsteps. - Notify
- Add Notify
If true, add animation notifies to the footstep frames. - Notify Class
Animation notify class to add. The default is AutoFootstepAnimNotify. - Notify Params
Parameters to pass to the animation notifies. Valid only if Notify Class is AutoFootstepAnimNotify. - Notify Track Name
Name of the notify track to which animation notifies will be added.
- Add Notify
- Sync Marker
- Add Sync Marker
If true, add sync markers to the footstep frames. - Marker Names by Foot Bone
Names of the sync markers for each foot bone. - Marker Track Name
Name of the notify track to which synch markers will be added.
- Add Sync Marker
- Advanced
- Frame Rate Override
The frame rate to use for detecting footstep frames. If false, the animation frame rate is used. Higher values will give more accurate results. - Ground Height Range
The higher the value, the coarser the footstep detection. If unnecessary footsteps are detected, change the value. - Grounded Threshold
The higher the value, the coarser the footstep detection. If the footstep frames are shifted, change the value. - Add Curves Of Location Z
If true, add curves of the foot bone location Z used to detect footsteps.
- Frame Rate Override
Use AutoFootstepAnimNotify to play effects based on surface type
-
Define surface types in project settings.
-
Create a Data Asset.
-
Select AutoFootstepEffectContext.
-
Open the data asset you created and define effects for each surface type. Pressing the "Add All Surface Type Elements" button will automatically add elements with all surface types as keys.
-
Create as many Physical Materials as you define surface types.
-
Open the physical materials you created and set a different Surface Type for each.
-
Set the physical material to a mesh or material, such as a floor, where you want to change the footstep effect.
-
Set AutoFootstepAnimNotify in Notify Class and the data asset you created in Effect Context of Notify Params.
Apply AutoFootstepAnimationModifier to automatically add animation notifies or sync markers to footstep frames.
Create a class that inherits from AutoFootstepAnimationModifier and override "On Notify Added" to control the parameters passed to animation notifies.
Use "Play Effect by Surface Type" of AutoFootstepEffectContext.