text
stringlengths 0
17.2k
|
---|
New Animation Node Functions will automatically create Input pins on the Function node which are used to pass through data from the bound Animation Blueprint node to the function's graph. Some function operations may not require the use of these pins, but other logic may require the data they provide, such as if you are using the function to read the current state of the node. |
You can also bind an existing function to an Animation Blueprint node, as long as it meets the following requirements: |
The function's Thread Safe property is enabled. |
The function must contain two Inputs. The first being an Anim Update Context Reference type, and the second being an Anim Node Reference type. Each of these inputs must also have their Pass-by-Reference property enabled. |
After creating or binding a new function to the Animation Blueprint node, the function will appear on the node in the AnimGraph. |
In this example, the Aim Offset logic, for getting a character's rotation and setting the pitch and yaw values, is all contained within the function. The engine only executes this logic while updating the Aim Offset node in the AnimGraph, rather than every tick in the Event Graph, significantly reducing performance costs. |
You can open an Animation Node Function directly from the associated Animation Blueprint node using the Magnifying Glass icon next to the function in the graph. |
Graphing logic in Animation Node Functions is similar to any other function graph in Unreal Engine. |
If you want to further increase your project's performance you can implement Animation Optimzation techniques, such as Property Access, to ensure the engine offloads the Animation Node Function onto the Worker Thread the animation update is executing on. |
When binding an Animation Node Function to a Sequence Player or Sequence Evaluator node, you can use Sequence Player nodes within the function to interface and play Animation Sequences directly using the Animation Node Function, providing gameplay teams with more control over animation playback. |
Here you can reference a list of the Sequence Player nodes and a description of their function. |
After creating a Sequence Player node in your animation function, and adding it to the graph, you will need to use a Convert node to provide the player node with the proper data. |
You can use Convert nodes to pass through data from the context Sequence Player and Evaluator Nodes to your Animation Node Function, in order to play animations using the Animation Blueprint Function. |
After adding a Sequence Player node to your Animation Node Function graph, add a Convert node from the Function node's Node pin, and connect the output to the Player node's Sequence Player or Sequence Evaluator input. |
When building an Animation Node Function directly on a Sequence Evaluator or Player node, you can use the pure function Convert nodes (green). |
When creating an Animation Node Function on different node types, for example a state machine, you must use the function convert nodes (blue) to properly convert the node to a Sequence Player or Evaluator. |
You can create Animation Blueprint Function Nodes on State Machine nodes, and use them to set Animation States of the State Machine. For example, you can use an On Update function with a Set State node to set an Animation State Machine State without the need to set up transition logic. |
You can use Set State nodes to directly set an animation state using an Animation Node Function, without the need to set up transition logic. Here, you can reference a list of the Set State node's properties and a description of their function. |
Set the node reference for the Set State node to use as a binding, the playrate, and the current playback time. |
Ensure this node is connected to a Convert to Animation State Machine node to properly set the State Machine from the function graph. |
When the function is bound directly to a State Machine node, you can use the pure Convert to Animation State Machine node (green). |
When the node is not connected directly to a state machine node, you must use the Convert to Animation State Machine function node (blue). |
Set the type of blend the node will use to transition the animations between states. |
You can select from the following options: |
You can use the Get State node to determine what Animation State is currently active. Here you can reference a list of the Get State node's Input and Output pins, and a description of their function. |
You can use the Is State Blending In or Out nodes to determine if the current animation state is blending in or out, in order to build logic to drive blending behaviors. Here you can reference a list of the Is State Blending In or Out nodes pins and a description of their function. |
When using the Is State Blending In or Out nodes, you must use a convert to Animation State node to provide the proper Node context data. When updating a function directly on an Animation State output node, you can use the pure Convert to Animation State node (green), for all other applicable instances, use the Convert to Animation State function node (blue). |
You can also bind Animation Node Functions directly to Animation states. However, function graphs can only be bound to Output Nodes within the States AnimGraph. |
For more information about using Animation Node Functions please see the Lyra example project. |
Animation In Lyra |
An overview of the Animation System in Lyra |
To reference an example workflow of setting up an Animation Node Function, see the Distance Matching documentation. |
Distance Matching |
An in depth look at Distance Matching in Unreal Engine with an example workflow implementation. |
Create a new Anim Node Function |
Graphing in Animation Node Functions |
Additional Resources |
Sequence Player Nodes |
State Machines |
Get State Node |
Binding a Function to States |
On Initial Update |
The engine calls logic bound to this function's graph before updating the Animation Blueprint Node for the first time. You can use this function to set constants for the node that will not change, such as component references or static values. |
On Become Relevant |
The engine calls logic bound to this function's graph every time the node becomes relevant in the graph. You can use this function to set dynamic values the node requires, but will not update while the node is evaluating. |
On Update |
The engine calls logic bound to this function's graph every tick when it updates the node. You can use this function to set dynamic values the node requires during its update. For an example workflow using the On Update function binding, see the Distance Matching documentation. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.