Component:FootstepSoundDefinition: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
Automated: update Fields
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
|Name=Footstep Sound Definition
|Name=Footstep Sound Definition
}}
}}
{{stub}}
The '''FootstepSoundDefinition''' component can be referenced by other components which can trigger this to play noise during footstep events.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ParentUnder|Slot|
|ParentUnder|Slot| The slot to parent played sounds under.
|MinDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv1=true|
|MinDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv1=true| The minimum distance the audio can be heard from before playing at maximum amount.
|MaxDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv2=true|
|MaxDistance|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Float|Float]]>'''|TypeAdv2=true| The max distance before the audio cannot be heard anymore.
|RolloffMode|'''[[Type:Nullable`1|Nullable`1]]<[[Type:AudioRolloffMode|AudioRolloffMode]]>'''|TypeAdv3=true|
|RolloffMode|'''[[Type:Nullable`1|Nullable`1]]<[[Type:AudioRolloffMode|AudioRolloffMode]]>'''|TypeAdv3=true| How played audio should fall off based on distance.
|Clips|{{RootFieldType|SyncList`1|[[#FootstepClip|FootstepClip]]}}|TypeAdv4=true|
|Clips|{{RootFieldType|SyncList`1|[[#FootstepClip|FootstepSoundDefinition.FootstepClip]]}}|TypeAdv4=true| Different footsteps that can play when this component is triggered
}}
 
== FootstepClip ==
{{Table TypeFields
|Clip|{{RootFieldType|AssetRef`1|[[Type:AudioClip|AudioClip]]}}|TypeAdv0=true| The audioclip to play for this foot step.
|Weight|Float| How likely it is for this foot step sound to play.
|MinVelocity|Float| The minimum player velocity required for the sound to play.
|MaxVelocity|Float| The maximum player velocity allowed for the sound to play.
|PlayForWalking|Bool| Should this audio clip be played when the user is walking?
|PlayForLanding|Bool| Should this audio clip be played when the user is landing from a jump?
|PlayForLeftFoot|Bool| Whether this sound should be played for the left foot.
|PlayForRightFoot|Bool| Whether this sound should be played for the right foot.
|VelocityMinPitch|Float| The minimum pitch multiplier that can be used with this foot step sound.
|VelocityMaxPitch|Float| The maximum pitch multiplier that can be used with this foot step sound.
|PitchMinVelocityReference|Float| The velocity the player should be moving to map to the minimum pitch for this sound.
|PitchMaxVelocityReference|Float| The velocity the player should be moving to map to the maximum pitch for this sound.
|MinPitchVariation|Float| The minimum random amount of pitch to add to the footstep.
|MaxPitchVariation|Float| The maximum random amount of pitch to add to the footstep.
|VelocityMinVolume|Float| The minimum volume that can be used with this foot step sound.
|VelocityMaxVolume|Float| The maximum volume that can be used with this foot step sound.
|VolumeMinVelocityReference|Float| The velocity the player should be moving to map to the minimum volume for this sound.
|VolumeMaxVelocityReference|Float| The velocity the player should be moving to map to the maximum volume for this sound.
|MinVolumeVariation|Float| The minimum random amount of volume to add to the footstep.
|MaxVolumeVariation|Float| The maximum random amount of volume to add to the footstep.
}}
}}


== Behavior ==
== Usage ==
Used to play sound when footsteps happen on surfaces or it receives a footstep event.


== Examples ==
== Examples ==
{{stub}}


== See Also ==
== See Also ==
* [[:Category:Components:Locomotion:Footsteps|Footstep components]]


[[Category:Components:Locomotion:Footsteps{{#translation:}}|Footstep Sound Definition]]
[[Category:Components:Locomotion:Footsteps{{#translation:}}|Footstep Sound Definition]]
[[Category:Components{{#translation:}}|Footstep Sound Definition]]
[[Category:Components{{#translation:}}|Footstep Sound Definition]]
[[Category:Components With Nested Types{{#translation:}}|Footstep Sound Definition]]
[[Category:Components With Nested Types{{#translation:}}|Footstep Sound Definition]]
[[Category:ComponentStubs]]

Latest revision as of 06:02, 17 March 2025

Component image 
File:FootstepSoundDefinitionComponent.png
Footstep Sound Definition component as seen in the Scene Inspector

The FootstepSoundDefinition component can be referenced by other components which can trigger this to play noise during footstep events.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
ParentUnder Slot The slot to parent played sounds under.
MinDistance Nullable`1<Float> The minimum distance the audio can be heard from before playing at maximum amount.
MaxDistance Nullable`1<Float> The max distance before the audio cannot be heard anymore.
RolloffMode Nullable`1<AudioRolloffMode> How played audio should fall off based on distance.
Clips list of FootstepSoundDefinition.FootstepClip Different footsteps that can play when this component is triggered

FootstepClip

Fields
Name Type Description
Clip AudioClip The audioclip to play for this foot step.
Weight Float How likely it is for this foot step sound to play.
MinVelocity Float The minimum player velocity required for the sound to play.
MaxVelocity Float The maximum player velocity allowed for the sound to play.
PlayForWalking Bool Should this audio clip be played when the user is walking?
PlayForLanding Bool Should this audio clip be played when the user is landing from a jump?
PlayForLeftFoot Bool Whether this sound should be played for the left foot.
PlayForRightFoot Bool Whether this sound should be played for the right foot.
VelocityMinPitch Float The minimum pitch multiplier that can be used with this foot step sound.
VelocityMaxPitch Float The maximum pitch multiplier that can be used with this foot step sound.
PitchMinVelocityReference Float The velocity the player should be moving to map to the minimum pitch for this sound.
PitchMaxVelocityReference Float The velocity the player should be moving to map to the maximum pitch for this sound.
MinPitchVariation Float The minimum random amount of pitch to add to the footstep.
MaxPitchVariation Float The maximum random amount of pitch to add to the footstep.
VelocityMinVolume Float The minimum volume that can be used with this foot step sound.
VelocityMaxVolume Float The maximum volume that can be used with this foot step sound.
VolumeMinVelocityReference Float The velocity the player should be moving to map to the minimum volume for this sound.
VolumeMaxVelocityReference Float The velocity the player should be moving to map to the maximum volume for this sound.
MinVolumeVariation Float The minimum random amount of volume to add to the footstep.
MaxVolumeVariation Float The maximum random amount of volume to add to the footstep.

Usage

Used to play sound when footsteps happen on surfaces or it receives a footstep event.

Examples

This article or section is a Stub. You can help the Resonite Wiki by expanding it.

See Also