Skip to main content

Animation Slot

Last Updated Time: 09/21/2023

Overview

The Slot can be served as a node in the animation tree to play dynamic actions (such as attack actions), and insert animation poses played outside the Animation Tree to be used by other nodes. Slots are often used with Montage.

Creating Slots

In the Anim Tree Editor, right-click on Slot Name under the Slot Manager,select Add Default Group And Slot to add a Slot Group or a Slot.

image-20230828161759493

To add a new slot, right-click on DefaultGroup or DefaultSlot,then select Add Slot , enter the slot name in the pop-up window and press Enter key to finish.

image-20230828163501822

After adding:

image-20230828163541559

Right-click the Slot Group to open the shortcut menu.

image-20230828163636662

NameDescription
Add SlotAdd a new slot.
Add GroupAdd a new slot group.
Delete GroupDelete the selected slot group.

Right-click the slot to open the shortcut menu.

image-20221122162814108

NameDescription
Delete SlotDelete the selected slot.
Rename SlotRename the selected slot.
Add SlotAdd a new slot.
Add GroupAdd a new slot group.
Delete GroupDelete the selected slot group.

After finish editing the slot, click on Save in the Slot Manager.

image-20230215144054722

Using Nodes

Right-click in the empty space of the Anim Tree to open the Nodes selection panel, expand the Montage category and select a slot from it.

image-20220909114823988

Finish adding:

Slot nodes are often paired with Layered Blend Per Bone nodes to achieve the character's upper and lower body action synthesis, such as:

image-20230828164803723

When there is no input outside the Animation Tree, the input of the Slot node UpperBody pin will be considered as the output, and the character will output the Locomotion animation.

When there is an external input, the output of the node will be switched to the external input, and the upper body of the character will be replaced by the input animation.

Properties

When a Slot node is selected, all of its properties will be shown in the Property Window.

PropertyDescription
GroupSlot group.
SlotSlot selection.
Transition ModeSelect the transition mode when playing the Slot node.
  • Cross Fade: The weight of the original animation gradually decreases, as the weight of the new animation gradually increases.
  • Inertia Transition: The inertia of the original animation will be retained at the beginning of the transition while gradually disappears during the transition.

Slot Groups

All created slots belong to slot groups, when the first slot is created, it will be automatically created under the DefaultGroup. To create a new slot group, right-click on slot or slot group in the Slot Manager and select Add Group, type in the name and press Enter key to finish creation.

image-20230914133113574

After creation:

image-20230914133141712

Slot groups can be used to categorize slots, and slots in the same group can affect each other. When playing animations within the same group, you can choose whether to stop other animations in the group through scripts or C++ project calls.

Inserting Animations into the Animation Tree Slot

Insert the default_Attack01 attack animation into the UpperBody slot in the Animation Tree through the BlendAction interface.

actor:BlendAction("default_Attack01", false, false, true, 1.0, true, "UpperBody", true)

Example

In terms of using Slot nodes, please refer to the examples in the Layered Blend Per Bone Nodes.