How do I continuous collision detect for a collision component

So, in unity you can choose the collision detection type in Unity, like discrete and continuous.

I need this feature but I can’t seem to fine it. I have tried set bTraceComplexOnMove to true but seems like default collision detection is still discrete.

Is it possible for to get the a collision component to use sweep?

You could do something like this from your OnHit function or OnOverlap.

UPrimitiveComponent * agh = SweepResult.GetComponent();

if (agh->GetName() == "TestBox")
	{
          //Do Stuff here.
    }

but OnHit only gets called when the object gets hit right? Isn’t it that the collision only happens under discrete mode first, so would not it be too late if I check it in OnHit function

there’s a bUseCCP which is continuous collision detection, just set it to true

Do you know if that is available among the Blueprints too?

Relatively old question, but for anyone who doesn’t know, in your component’s Collision settings there is a “Use CCD” checkbox. You need to expand the Collision section to see it (it’s not in the main list of options), so click the down-arrow at the bottom of the section and it will be there.

Where is bUseCCP defined? I can’t seem to find it anywhere in the Engine code.

Typo in the answer above. Here it is:

MyMeshComponent->GetBodyInstance()->bUseCCD = true;

A million thanks from the future.

An a misprint in answer : the right checkbox is “UseCCD”