Random Sequence Player
Play a random animation from a list
UAnimGraphNode_RandomPlayer
FAnimNode_RandomPlayer
Plays a selection of animation sequences in a randomized fashion.
The sequences to play are defined in a statically defined “Entries” array, that cannot be exposed from the node. Each entry holds the following information:
- Sequence: The sequence for this entry
- Chance to Play: The chance to pick this entries sequence, if not in shuffle mode
- Min Loop Count: Minimum number the sequence has to loop before the node will move on to another entry
- Max Loop Count: Maximum number the sequence can loop until the node will move on to another entry
- Min Play Rate: Minimum play rate the sequence is allowed to be played at
- Max Play Rate: Maximum play rate the sequence is allowed to be played at
- Blend In: Blend settings to use when moving on from another entry to this one.
The node also has a “shuffle mode”. In shuffle mode, the Chance to Play will be ignored, but the node will randomly move through the entries and not revisit an already visited entry until every entry has been used.
If not in shuffle mode, it will determine which one to play based on the Chance to Play.
Under the hood, all chances in the entries are normalized against each other.
So if three entries are configured, each with a chance of 1.0, then each will have an actual chance of 0. 333 . Likewise, if there are two samples, A and B, with A having a weight of 1.0 and B having a weight of 3, the final weights would evaluate to 0.25 for A and 0.75 for B.