How-To Apply a Physical Animation Profile

Choose your OS:
Prerequisite Topics

This page assumes you have prior knowledge of the following topics. Please read them before proceeding.

Below you will find the steps for creating a simple graph to enable a Physical Animation Profile on a Skeletal Mesh Component in a Pawn.

Steps

  1. Open or create a Blueprint with a Skeletal Mesh Component.

    • Or, if your Blueprint doesn't contain a Skeletal Mesh Component, add one using the Components Panel.

    addSkelMeshComp.png

  2. Adjust the Skeletal Mesh Component Collision settings.

    • The Collision Preset needs to be changed so that that Skeletal Mesh Component has Collision Enabled but also so it doesn't interact with Pawns:

      collisionSettings.png

      You'll notice that the Object Type is set to Pawn and that we're ignoring Pawns in our collision channels. This fixes the issue of the Skeletal Mesh trying to eject itself from the collision capsule. However, if you want the Skeletal Mesh to collide with other Pawns you'll need to adjust what Object Type your Skeletal Mesh is and then change how the Capsule interacts with that Object Type. See: Add a Custom Object Type to Your Project , for more information on creating Custom Collision Channels.

  3. Add a Physical Animation Component to your Blueprint using the Components Panel.

    addPhysAnimComp.png

  4. Add a Name Variable and call it Bone Name.

    variableName.png

  5. Compile so we can set the value of the Bone Name variable.

    compile.png

  6. Change Bone Name Default Value to the desired target Bone, in this case spine_01.

    boneName.png

  7. Switch to the Event Graph.

  8. Locate or create the Event BeginPlay event node.

    eventBP.png

  9. Add a Set Skeletal Mesh Component Node connecting to Event Beging Play

    • Target is the Physical Animation Component you added above.

    • In Skeletal Mesh Component is the Skeletal Mesh Component in your Blueprint or the one you added above.

    createSetSkel.png

  10. Add a Apply Physcial Animation Profile Below Node connecting to the Set Skeletal Mesh Component Node.

    • Target is the Physical Animation Component.

    • Body Name will accept the Bone Name variable as input. In Physics Assets, Physics Bodies are named after their Bone.

    • Profile Name the name of the Physical Animation Profile you wish to apply to the Skeletal Mesh.

    • Since we are using `spine_01' as the desired bone so that just the upper body animates, Include Self should be checked.

    • Clear Not Found is optional, but we've set it to True to clear any bones that are not found in the profile.

    applyPhysAnim.png

  11. Set All Bodies Below Simulate Physics Node connected to the Apply Physcial Animation Profile Below Node. This will complete our graph.

    • Target is your Skeletal Mesh Component.

    • In Bone Name will take the Bone Name variable as input.

    • New Simulate should be set to True.

    • Again, since we are using spine_01 as the target bone, Include Self should be checked.

    Copy Node Graph

    ApplyPhysicialAnimProf_BP.png

    Hidden Graph Information

    Variable

    Value

    Description

    Bone Name spacer.png

    spine_01

    The name of the Bone in the Skeletal Mesh to start applying the Physical Animation Profile. We also use it in the Set All Bodies Below Simulate Physics.

    Component

    Description

    Physical Animation Component

    This is the component that actually handles the Physical Animation of our Skeletal Mesh.

    Skeletal Mesh Component

    The Skeletal Mesh Component that will be physically animated. If working from an existing Blueprint that inherits from Character, it will simply be named Mesh.

Result

When finished, your Skeletal Mesh Component will be simulating physics using the Physical Animation Component while in runtime.

resultApplyPAP.png