Setting ECollisionEnabled::QueryOnly on a capsule collider still has collisions?

I have a capsule collider on a character that I want to turn off its collision, however I still want it to be visible in sweeps and overlaps.
If I set it’s collision to ECollisionEnabled::QueryOnly like this;


GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::QueryOnly);

the overlaps and sweeps work great, but it still collides with other objects. If I instead set it to no collision;


GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision);

Then the collision is off, as expected, but of course so are the sweeps and overlaps.

Is this a bug or am I misunderstanding something? I assumed QueryOnly should turn off collisions?

Some systems (Actors running into each other) rely entirely on overlaps. So, turning them to Query Only doesn’t do anything. The better solution would be to modify the collision response and set things to “Ignore” (except for probably static objects so you don’t fall through the floor).

Thank you very much for the reply.

I just did a quick test with;


GetCapsuleComponent()->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);

and apart from falling through the floor (as expected), it seemed to work as I needed it too.
Now I have to do a little more research on the best way to store and set all the channels, but I have a better direction to go in now.

Thanks again!

Create a custom object type for the floor, set its response to block, visibility to overlap.