In this lesson, you will learn how to configure collision filters within multi-body actors, such as ragdolls, to prevent jittery physics artifacts caused by internal components colliding with each other.
The Problem: Self-Collision Artifacts
When you have an actor composed of multiple bodies—like a character's skeletal mesh transitioning into a ragdoll—those bodies are packed tightly together. Without proper filtering, the arm might collide with the torso, or the thigh with the pelvis, resulting in "spasming" or physics jitter as the solver struggles to resolve overlapping collisions within a single actor.
The Solution: Collision Filtering via Profiles
Instead of disabling collision entirely, we use Collision Profiles and Ignore Actors/Components to define which parts of a multi-body system are allowed to touch.
- Ignore Self: The most efficient approach is to set the
Collision Responsefor the specific components to ignore the profile assigned to the rest of the body. In your character’s Physics Asset, you can select specific bodies and adjust their Collision Enabled settings or modify the Collision Profile. - Constraint Filtering: When using physics constraints to join bodies (like a hinge for an elbow), you can toggle the Disable Collision flag directly within the constraint settings. This tells the Chaos solver to completely disregard collisions between these two specific bodies, regardless of their parent profiles.
For instance, in C++, if you need to dynamically ignore self-collision during a transition, you can modify the collision response at runtime:
// Within your character class, after entering Ragdoll state
GetMesh()->IgnoreComponentWhenMoving(RootComponent, true);
// Or for specific bodies in a Physics Asset
FBodyInstance* BodyInstance = GetMesh()->GetBodyInstance("UpperArm");
BodyInstance->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
Best Practice
Always start by checking your Physics Asset (PhAT). Within the "Collision" tab, you can select two bodies and click "Disable Collision" to create an entry in the "Ignore List." This is much more performant than creating complex collision channels, as it offloads the exclusion logic to the solver's internal lookup table.
Key Takeaway: Use the Physics Asset constraint ignore lists and targeted component collision profiles to disable internal body-to-body collisions, effectively eliminating physics jitter in multi-body actors.