Physics Control
Giving ragdolls some intention in Unreal Engine.
The idea
Physics Control is a plugin for Unreal Engine that aims to make it easier to control physically simulated characters. It doesn't add behaviours by itself, but it gives a higher-level way of building them, so that characters can follow their animation, react to hits and pushes, or look like they're trying to do something, rather than just falling over like a ragdoll.
Without it, a character could fall over under physics, but controlling that motion meant working with interfaces that didn't lead towards setups that looked good and behaved well. Anything beyond the simplest control turned into a lot of complicated code on the game side.
How it works
The plugin has three parts.
- The Physics Control Component adds controls to a character that's simulated in the main Chaos physics world, so its motion can affect gameplay. It's typically driven from Blueprints.
- The Rigid Body With Control animation node runs a separate, cosmetic simulation in the Animation Blueprint, like the Rigid Body node, but with full support for the same controls.
- An editor can be used to set up the controls and profiles for both.
Both let you do similar things. The choice is whether the physics should be purely cosmetic, or part of the world and able to affect gameplay.
The controls themselves are meant to be intuitive and consistent with each other, so a setup is easy to make and easy to change while the game is running. Settings can be grouped into profiles, which you author and test in the editor and then switch to at runtime with a single call.
For example, Fortnite uses Rigid Body With Control to help the characters paraglide and skydive into the game. Animations provide the intent, with the basic poses the animators want to see as the player turns and moves. Physics Control is layered on top. It tracks that target animation, and adds physical movement that makes the character look real and part of the world.
The Game Animation Sample uses the Physics Control Component instead, for active ragdolls that flail and get up again, where the character's motion is part of the world.
Documentation and examples
Epic's free samples are a good place to start. The Content Examples project has many example setups, and the other two show it in use.
- Content Examples sample project (many example setups)
- Game Animation Sample Project (active ragdolls, flailing and get-ups)
- Stack-O-Bot sample game
- Physics Control API reference (Epic documentation)
On this Inside Unreal livestream I went through the physics in the Game Animation Sample (UE 5.8): control profiles, active ragdolls, and ragdoll flailing and get-ups. The video starts at the physics section.