RigidBody

The RigidBody Skeletal Control node (pictured below) can be used for light-weight physics simulation on characters using the high-performance Immediate Mode PhysX API.The RigidBody node can be added to the AnimGraph of your Animation Blueprints and can even be used with Blend Nodes, enabling you to switch from a pose into a simulated physics state. Characters using this simulation can also generate collision with static geometry in the world.

A typical use case for the RigidBody node is on characters that have ponytails, chains, or other bones that "dangle", all of which you want to apply physics to.

Above, the hoses coming out of the character's head have a Physics Asset that is used with the RigidBody node inside an Animation Blueprint.

Input and Output Pins

The table below outlines the available input and output pins along with a definition of the pins usage. 

RigidBodyPins.png

Pin

Description

External Force

Applies a uniform external force in World Space. For example, this allows for easily faking inertia of movement while still simulating in component space. 

Component Pose

Takes in a Pose in Component Space and Outputs a Pose in Component Space. 

Alpha

Current strength of the Skeletal Controls. 

Example RigidBody Node Setup

Before using this node, inside your Physics Asset select and set the Physics Bodies you want to simulate to Simulated.

Above, we have set each of the bones associated with the hoses that come from the character's head to simulate physics.

With your Physics Asset set up, inside the AnimGraph of your Animation Blueprint, add the RigidBody node and the necessary logic to define when to use it.

Above, we are taking in data from another Animation Blueprint and feeding it through the RigidBody node before ending in our Final Animation Pose.

With the Rigid Body node selected in your AnimGraph, you can change properties that define how the node is used inside the Details panel.

RigidBodyDetails.png

Property

Description

Override Physics Asset

Physics asset to use. If empty, the Skeletal Mesh's default Physics Asset will be used.

Override World Gravity

Enables specification of a vector value to override gravity for this body.

External Force

Applies a uniform external force in world space. For example, this allows for easily faking inertia of movement while still simulating in component space.

Overlap Channel

The channel used to find static geometry to collide with.

Simulation Space

What space to simulate the bodies in, this affects how velocities are generated. Options include: Component Space, World Space, or Base Bone Space.

Base Bone Ref

The Base Bone to use when Simulation Space is set to Base Bone Space.

Cached Bounds Scale

Scale of cached bounds (versus actual bounds). Increasing this may improve performance, but overlaps may not work as well. A value of 1.0 effectively disables cached bounds.

Freeze Incoming Pose on Start

When simulation starts, freeze incoming pose. This is useful for ragdolls, when we want the simulation to take over. It prevents non-simulated bones from animating.

(As Pin) Alpha

Shows the Alpha property as a pin on the node or in the Details panel.

Alpha Scale Bias

Set the Minimal and Maximal Influence values for the Alpha property.

Property

Description

LOD Threshold

This is the max Level of Detail (LOD) that this node is permitted to run on. For example: if you have LOD Threshold set to 2, it will run until LOD 2, but disable itself once the component's LOD becomes 3.

Using Joints as a Base for Simulation

As of engine version 4.20, the RigidBody node supports any joint as a base for simulation by setting Simulation Space to Base Bone Space and selecting a bone to use as the Base Bone Ref. One thing to note however, moving the entire Skeletal Mesh and individually modifying the Base Bone will have no affect on velocities.

Below is an example of using the RigidBody node and simulating from an assigned Base Bone for a weapon. 

Resetting Dynamics

The RigidBody node also supports Reset DynamicsTo use this, get the Anim Instance from a Skeletal Mesh in Blueprint and use the function call, Reset Dynamics to reset the simulation. 

ResetDynamics.png