Class CharacterFootfalls
Where the bodies' footfalls are told: every CharacterBody raises one each time a foot comes down, on every client, for the character this client owns and for those it only watches alike. The client's sound listens.
public static class CharacterFootfalls
- Inheritance
-
CharacterFootfalls
- Inherited Members
Remarks
From the feet themselves. A body on screen raises a step when one of its foot bones, swinging, comes back down onto the ground under it (FootfallTracker): the sound lands with the foot the player sees land, for any clip and any gait. A body off screen has no bones to watch (its animator is culled), so it raises a step every stride of the distance it goes — still heard behind the camera, a stride apart.
Never from the movement. The owner's controller replays its ticks when it reconciles; a sound raised there would be heard twice. A body is posed once a frame from what it is seen to do, so each footfall is raised once.
Fields
Ear
Where the footfalls are heard from: set by the listener each frame.
public static Vector3 Ear
Field Value
- Vector3
Reach
How far from Ear any footfall is heard, metres; a body further off raises none.
public static float Reach
Field Value
Properties
Heard
Whether anything is listening (a dedicated server, a batch run: nothing is, and no ray is cast).
public static bool Heard { get; }
Property Value
Methods
InReach(Vector3)
Whether a footfall at point could be heard.
public static bool InReach(Vector3 point)
Parameters
pointVector3
Returns
Raise(in Footfall)
public static void Raise(in Footfall footfall)
Parameters
footfallFootfall
Events
Fell
Raised on the main thread, once for each footfall of every body.
public static event Action<Footfall> Fell