Unreal Engine 5 · Blueprint → C++
Set Collision Response to Channel in Unreal Engine 5 C++UE Docs
The Blueprint Set Collision Response to Channel node maps to UPrimitiveComponent::SetCollisionResponseToChannel, which sets how a component reacts to a specific ECollisionChannel using ECR_Ignore, ECR_Overlap, or ECR_Block.
Blueprint node & C++ equivalent
MyComponent->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
// Responses: ECR_Ignore, ECR_Overlap, ECR_BlockWhat does Set Collision Response to Channel do?
It defines how this component responds to objects on one collision channel, such as ECC_Pawn, ECC_WorldStatic, or a custom trace channel. The response can be Ignore (no interaction), Overlap (generate overlap events), or Block (physically stop and generate hit events).
Tuning responses per channel is how you make, for example, a trigger that overlaps pawns but blocks projectiles.
How to use it in C++
Call MyComponent->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap); to make the component overlap anything on the Pawn channel. Replace the channel and response as needed, for example SetCollisionResponseToChannel(ECC_Visibility, ECR_Block) to be hit by visibility traces.
To change every channel at once, use SetCollisionResponseToAllChannels(ECR_Ignore) first, then set the specific channels you care about.
Frequently asked questions
What are the collision response values in UE5 C++?+
The ECollisionResponse enum has three values: ECR_Ignore to pass through with no events, ECR_Overlap to generate overlap events, and ECR_Block to physically block and generate hit events.
How do I make a component overlap pawns but block everything else?+
Call SetCollisionResponseToAllChannels(ECR_Block) then SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap). The pawn channel overlaps while the rest stay blocking.