Collision Presets and CCD in C++

Is there a way to set collision presets in C++? Also, how to set CCD to true in C++?

Hope this helps:

  1. UPrimitiveComponent::SetCollisionProfileName
  2. FBodyInstance::bUseCCD

Apologies for the necroposting but since I’ve just had this problem-

At least in UE5 in 2023 you have to call UpdateInstanceSimulatePhysics() on the FBodyInstance after setting bUseCCD to true.

const UStaticMeshComponent* Component = GetStaticMeshComponent();
if (!Component) return false;

FBodyInstance* Body = Component->GetBodyInstance();
if (!Body) return false;

Body->bUseCCD = true;
Body->UpdateInstanceSimulatePhysics();
1 Like