Language:
Page Info
Skill Level:
Engine Version:

2 - Applying AnimDynamics

Now that our character is set up with an Animation Blueprint and has bones that we want to dynamically animate, we can do so from the AnimGraph of our Animation Blueprint with the AnimDynamics node.

In our example, the character is carrying a large furnace around their neck that we want to be animated based on character movement. If you are using your own character, you can follow the steps below and assign the bone(s) you want to drive with AnimDynamics and adjust the settings as desired.

Steps

  1. In the Content Browser, open the character's Animation Blueprint (GruntAnimBP).

    1_OpenAnimBP.png

  2. Click MyBlueprint, then AnimGraph to open the Animation Graph.

    2_AnimGraph.png

  3. Right-click in the graph and search for and add the AnimDynamics node.

    3_AddNode.png

    The AnimDynamics node takes in an External Force value which is additional force to apply to all bodies in the simulation (this is optional but may be something to consider). It also takes in the Component Pose which is the reference pose data as well as an Alpha value (the strength in which to apply the skeletal control where 0 is no strength and 1 is full strength).

  4. Copy and Paste the node, then connect the nodes as shown below.

    4_ConnectNodes.png

    The Local to Component and Component to Local will be automatically created when connecting pose pins.

    In our example we are using two AnimDynamics nodes (one to affect the Harness and another to affect the Furnace).

  5. Select the first AnimDynamics node in the sequence, then in the Details panel assign the settings shown below.

    5_Furnance1.png

    The Preview section is all about visualization which help to indicate the current limits applied to the movement in the viewport. You can also see Collision Spheres if you are using Planar Limits and CoM (Center of Mass) is not enabled (which is outside the scope of this example but you can experiement with this setting).

    The last thing we set is the Bound Bone or bone we are affecting which we set to the furnace bone on our character (this bone affects the Harness).

  6. With the node still selected, set the Setup and Constraint sections as shown below.

    6_Furnance1.png

    The Setup and Constraint sections are where you define the movement and range of movement for the bone driven by AnimDynamics. The Box Extent provides the inertia, the Local Joint Offset defines the pivot point and Angular Limits provide the rotational range of movement (which is indicated by the preview visualization options when enabled).

    Please see AnimDynamics section of Skeletal Controls for more information on Setup and Constraint settings.

  7. Click Compile and notice how the harness object tilts to the side.

    6_Furnance1b.png

    The Angular Limits for the Y axis is quite large right now indicated by the green cone in the picture above. Let's reduce this range.

  8. With the node still selected, in the Constraints section, adjust the Angular Limits for Min/Max as shown below.

    6_Furnance1c.png

    When you Compile this time, the harness should not shift as much to either side (even if you adjust the Speed or IsInAir? settings).

    6_Furnanced.png

  9. Select the second AnimDynamics node in the sequence and use the following settings.

    Click for full view.

    With the settings above, we changed the Bound Bone to now target the Furnace_Pivot bone in our character which affects the furnace object. We also adjusted the Twist Axis so that it twists on the Y axis providing back-and-forth movement instead of side-to-side. The Angular Limits are set to -50 and 50 as the range in which to move.

  10. Compile and Save then play in the editor.

End Result

You should now see that the furnace for our example character bounces around as the character moves based on our constraint settings.

Feel free to experiment with the Box Extent and Local Joint Offset values in the Setup section as well as the Linear and Angular Limits in the Constraints section to see how it alters the movement of our bones affected by AnimDynamics.