Draw debug of SweepSingleByChannel?

Looking for the proper way to simulate blueprint’s BoxTaceByChannel “draw debug” functionality.

Never had to do this before because generally drawing a small sphere at the hit location is good enough. But that’s not really how the trace works…

DrawDebugBox can work, ofc, but do I really have to manually do the math for it?
The impact point of the trace can be anywhere within the box extent, so I have to dump the X/Y of the hit result and just use it’s Z to display the correct position.
It’s no big deal really, but because BP has it so much easier I think I have always just done this wrong?

The proper answer to this was to just use the kismet c++ library instead of writing my own c++ debug function - otherwise there’s literally no point in even using this cluster of an engine…

The answer was in the thread I posted, but not in the message that appeared:

These functions are called UKismetSystemLibrary::CapsuleTraceMultiForObjects, UKismetSystemLibrary::SphereTraceSingle etc. There are different combinations. These include the debug and the input and and output matches the blueprint counterpart.

In this example call you also have how to declare an empty actor TArray and how to convert the trace channel type:

UKismetSystemLibrary::SphereTraceMulti(this, CameraComponent->GetComponentLocation(), GetActorLocation(),
Radius, UEngineTypes::ConvertToTraceType(ECC_Visibility), false,
TArray<AActor*>(), EDrawDebugTrace::ForOneFrame, OutHits, true)

Use EDrawDebugTrace::Type | Unreal Engine Documentation to enable or disable the debug trace.