Hello, how can i use SweepMulti with box Shape?
I’m trying to use that:
GetWorld()->SweepMulti(outHits, points[i].location, points[i].location+FVector(0, 0, -100), FQuat::Identity, FCollisionShape::MakeBox(pointSize), ECollisionChannel::ECC_Visibility, objectList)
but it’s seems not working, it’s not return any hit result.
What means “End” in this function?
Same problem here,
Start is Z +15000
End is Z - 15000, i´ve tried different channels.
// Initialize hit info
TArray<FHitResult> HitOutList;
// Get World Context
TObjectIterator< APlayerController > CurrentPlayerController;
if (!CurrentPlayerController) return HitOutList;
FCollisionQueryParams TraceParams(FName(TEXT("MultiShapeTraceByChannel")), true, ActorToIgnore);
TraceParams.bTraceComplex = true;
// TraceParams.bTraceAsyncScene = true;
TraceParams.bReturnPhysicalMaterial = ReturnPhysMat;
// Ignore Actors
TraceParams.AddIgnoredActor(ActorToIgnore);
CurrentPlayerController->GetWorld()->SweepMultiByChannel(
HitOutList,
Start,
End,
Rotation,
CollisionChannel,
CollisionShape,
TraceParams);
return HitOutList;
Best regards,
Maik
Hi. Try debugging :
GetWorld()->DebugDrawTraceTag = "DebugTraceTag";
FComponentQueryParams params;
....
params.TraceTag="DebugTraceTag"
GetWorld()->SweepMulti(..... , params)
You see the debugging information about “SweepMulti” like here GetWorld()->ComponentSweepMulti() incorrect working - World Creation - Unreal Engine Forums
Thanks for the help, now i found why its not working.
First i had some problem with my collision profile configuration
Second i used the “Get Hit Result under Cursor” as a start for further operations in C++ with wrong channel.
My problem is solved now.
Best regards,
Maik