RealDocs

UPrimitiveComponent::SetCollisionResponseToAllChannels

function Engine Blueprint Since unknown
#include "Components/PrimitiveComponent.h"
Access: public Specifiers: virtual

Description

Sets this component's response to all collision channels to a single value at once. Useful as a reset before applying per-channel overrides.

Signature

virtual void SetCollisionResponseToAllChannels(ECollisionResponse NewResponse)

Parameters

Name Type Description Default
NewResponse ECollisionResponse Response to set on every channel: ECR_Ignore, ECR_Overlap, or ECR_Block.

Return Type

void

Caveats & Gotchas

  • Like SetCollisionResponseToChannel, this detaches the component from its named profile.
  • Commonly used as a 'blank slate' before calling SetCollisionResponseToChannel for specific channels.

Example

Reset and selectively re-enable channels C++
// Ignore everything, then add back specific overlaps
MeshComp->SetCollisionResponseToAllChannels(ECR_Ignore);
MeshComp->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Block);
MeshComp->SetCollisionResponseToChannel(ECC_Pawn, ECR_Block);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.