Hi, this is one more collision question in UE5.4
It seems I can’t get OverlapMultiByChannel to work with custom trace channels.
I have a cover point with the following collision profile.
If I search for overlap in Visibility channel, like this
TArray<FOverlapResult> OverlapResults;
FCollisionShape SphereShape = FCollisionShape::MakeSphere(SearchRadius);
FCollisionQueryParams SphereParams(SCENE_QUERY_STAT(CoverPointOverlap), false, nullptr);
GetWorld()->OverlapMultiByChannel(OverlapResults, CursorWorldLocation, FQuat::Identity, ECollisionChannel::ECC_Visibility, SphereShape, SphereParams)
I am able to receive my object in OverlapResults (together with many other visible objects)
ECC_Camera returns my object as well.
However,
as soon as I change my collision channel to user defined, e.g. ECC_GameTraceChannel1 (ignoring in-game redefinition for simplification)
GetWorld()->OverlapMultiByChannel(OverlapResults, CursorWorldLocation, FQuat::Identity, ECollisionChannel::ECC_GameTraceChannel1, SphereShape, SphereParams)
I can’t receive my object anymore in OverlapResults, which is very unfortunate.