In this lesson, you will learn how to configure Collision Response Matrices to dictate exactly how different game objects physically interact, preventing jitter and unintended collisions.
The Physics "Table of Rules"
When two objects collide in Unreal Engine, the engine needs to know what should happen: should they bounce off each other, pass through one another, or trigger an event? This is governed by the Collision Response Matrix.
Think of this matrix as a grid where each axis represents a type of object (an Object Channel). If your project has channels for Player, Enemy, and Projectile, the matrix defines the relationship between every combination:
- Block: Objects hit each other and stop (like a wall).
- Overlap: Objects pass through each other but trigger a
BeginOverlapevent (like a coin pickup). - Ignore: Objects move through each other without any interaction or event.
Preventing Physics Jitter
Jitter often occurs when two objects are set to Block against each other while simultaneously trying to move into the same space using physics forces. Because they are both fighting for the same coordinate, the engine rapidly resolves the overlap, causing the "shaking" or "vibrating" effect.
You can solve this by refining your matrix. For example, if you have a Decoration channel and a PhysicsProp channel, you might set the matrix to Ignore rather than Block to stop props from constantly colliding with static clutter.
Implementation
To configure this, you navigate to Project Settings > Collision. Under Object Channels, you define your types. Then, under Preset, you configure the matrix for specific components:
// Within your Character/Actor Component setup
GetMesh()->SetCollisionResponseToChannel(ECC_GameTraceChannel1, ECR_Overlap);
GetMesh()->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Block);
By ensuring your Projectile ignores the Player channel but blocks WorldStatic, you prevent self-collision errors that lead to erratic movement or physics instability. Always keep your matrix as minimal as possible; the fewer "Block" rules the engine has to calculate, the more stable and performant your simulation will be.
Key Takeaway: The Collision Response Matrix is your master switch for physics logic; by precisely choosing between Block, Overlap, and Ignore, you resolve physical conflicts and eliminate jitter before it begins.