Random Player
Last Updated Time: 09/08/2023
Overview
Random Player nodes can select some animation assets for random play.
Creating Random Player Nodes
Right-click on the blank space in the editing area to open the Node Selection panel in Anim Tree Editor. Expand Misc., and select Random Player to create a Random Player node.
After creation:
Properties
Select the Random Player node, and various properties of this node can be seen in the Property Window.
Property | Description |
---|---|
Shuffle Mode | If checked, each animation will be randomly played without repeating, and the Chance To Play will be invalid at this time; if not checked, it will be played randomly. |
Array Element | Click the "+" button to increase the shuffle array; click the "-" button to decrease the shuffle array. |
Asset Name | Select the name of the animation asset. |
Preload | Whether to preload the animations. |
Chance To Play | The chance to play the animation. |
Min Loop Count | The minimum number of loops to play each time the animation is played. |
Max Loop Count | The maximum number of loops to play each time the animation is played. |
Min Play Rate | The minimum play rate of the animation. |
Max Play Rate | The maximum play rate of the animation. |
Blend Time | Animation blend in and out time. |
Blend Mode | There are 14 optional modes as follows:
|
Example
Here is an example demonstrating the features of the Random Player.
Creating Characters
Refer to the documentations Assembling Actors and Animation Trees to create a Character and an Animation Tree.
Configuring Animation Trees
Add a Random Player node and link it to the Final Animation Pose node in the Anim Tree Editor.
Select the Random Player node and set its properties in the Property Window. Click the button to create two Array Elements. Set the Asset Names of them respectively, and select two different animation assets. Other related properties can be modified as needed.
Click the Apply button to see the character play randomly between the two animations.