diff --git a/Source/RapyutaSimulationPlugins/Private/Sensors/RR3DLidarComponent.cpp b/Source/RapyutaSimulationPlugins/Private/Sensors/RR3DLidarComponent.cpp index a718a71c..d6485e91 100644 --- a/Source/RapyutaSimulationPlugins/Private/Sensors/RR3DLidarComponent.cpp +++ b/Source/RapyutaSimulationPlugins/Private/Sensors/RR3DLidarComponent.cpp @@ -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 }