Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,34 @@ void URR3DLidarComponent::TickComponent(float DeltaTime, enum ELevelTick TickTyp
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
#if TRACE_ASYNC
verify(TraceHandles.Num() == RecordedHits.Num());
UWorld* world = GetWorld();
for (auto i = 0; i < TraceHandles.Num(); ++i)
{
FTraceHandle& traceHandle = TraceHandles[i];
FHitResult& recordedHit = RecordedHits[i];
if (traceHandle._Data.FrameNumber != 0)
{
FTraceDatum Output;
if (world->QueryTraceData(traceHandle, Output))
{
if (Output.OutHits.Num() > 0)
{
traceHandle._Data.FrameNumber = 0;
// We should only be tracing the first hit anyhow
recordedHit = Output.OutHits[0];
}
else
{
traceHandle._Data.FrameNumber = 0;
recordedHit = FHitResult();
recordedHit.TraceStart = Output.Start;
recordedHit.TraceEnd = Output.End;
}
}
}
}
// Note: Let this here in case we found a way to use AsyncLineTraceSingleByChannel without compromising RTF
// verify(TraceHandles.Num() == RecordedHits.Num());
// UWorld* world = GetWorld();
// for (auto i = 0; i < TraceHandles.Num(); ++i)
// {
// FTraceHandle& traceHandle = TraceHandles[i];
// FHitResult& recordedHit = RecordedHits[i];
// if (traceHandle._Data.FrameNumber != 0)
// {
// FTraceDatum Output;
// if (world->QueryTraceData(traceHandle, Output))
// {
// if (Output.OutHits.Num() > 0)
// {
// traceHandle._Data.FrameNumber = 0;
// // We should only be tracing the first hit anyhow
// recordedHit = Output.OutHits[0];
// }
// else
// {
// traceHandle._Data.FrameNumber = 0;
// recordedHit = FHitResult();
// recordedHit.TraceStart = Output.Start;
// recordedHit.TraceEnd = Output.End;
// }
// }
// }
// }
#endif
}

Expand Down