4.7.5 ECollisionChannel in trace functions does not work properly

Hi ,

I think the issue you’re having is with the difference between object queries and channel queries. This is why we’ve introduced explicit function names to make it clear which query is being done.

Here you are doing a channel query:

GetWorld()->LineTraceSingle(HitResult, WorldOrigin, WorldOrigin + WorldDirection * 100000.f, ECC_WorldStatic, FCollisionQueryParams(true))

Here you are doing an object query:

GetWorld()->LineTraceSingle(HitResult, WorldOrigin, WorldOrigin + WorldDirection * 100000.f, FCollisionQueryParams(true), FCollisionObjectQueryParams(ECollisionChannel::ECC_WorldStatic))

In 4.8 you would simply use LineTraceSingleByChannel and LineTraceSingleByObjectType

In your examples I assume you are changing the object type to be not world static, but what you want is to change whether the object’s collision response blocks on world static.

Hope I understood your issue.

This blog post should give more details under TRACE CHANNELS AND OBJECT CHANNELS: https://www.unrealengine.com/blog/collision-filtering