Allow UE4 tick rate in sensors
This commit is contained in:
parent
961622862c
commit
c0a3ee4a3a
|
@ -64,7 +64,6 @@ static void WritePixelsToBuffer_Vulkan(
|
|||
gPixels,
|
||||
FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX));
|
||||
Buffer.copy_from(Offset, gPixels);
|
||||
UE_LOG(LogCarla, Warning, TEXT("After - ReadSurfaceData() - %d, %d, %d"), GFrameCounter, GFrameNumber, GFrameNumberRenderThread);
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
@ -130,7 +129,6 @@ void FPixelReader::WritePixelsToBuffer(
|
|||
FRHICommandListImmediate &InRHICmdList
|
||||
)
|
||||
{
|
||||
UE_LOG(LogCarla, Warning, TEXT("WritePixelsToBuffer() - %d, %d, %d"), GFrameCounter, GFrameNumber, GFrameNumberRenderThread);
|
||||
check(IsInRenderingThread());
|
||||
|
||||
if (IsVulkanPlatform(GMaxRHIShaderPlatform) || IsD3DPlatform(GMaxRHIShaderPlatform, false))
|
||||
|
|
|
@ -57,9 +57,6 @@ void ARayCastLidar::Set(const FLidarDescription &LidarDescription)
|
|||
|
||||
void ARayCastLidar::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime)
|
||||
{
|
||||
// ASensor::Tick(DeltaTime);
|
||||
// UE_LOG(LogCarla, Warning, TEXT("PrePhysTick: %f"), DeltaTime);
|
||||
UE_LOG(LogCarla, Warning, TEXT("ARayCastLidar::PostPhysTick() - %d, %d, %d"), GFrameCounter, GFrameNumber, GFrameNumberRenderThread);
|
||||
SimulateLidar(DeltaTime);
|
||||
|
||||
auto DataStream = GetDataStream(*this);
|
||||
|
|
|
@ -496,6 +496,12 @@ void ASceneCaptureSensor::BeginPlay()
|
|||
Super::BeginPlay();
|
||||
}
|
||||
|
||||
void ASceneCaptureSensor::PrePhysTick(float DeltaSeconds)
|
||||
{
|
||||
// Allows the sensor to tick with the tick rate from UE4.
|
||||
ReadyToCapture = true;
|
||||
}
|
||||
|
||||
void ASceneCaptureSensor::PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime)
|
||||
{
|
||||
// Add the view information every tick. It's only used for one tick and then
|
||||
|
|
|
@ -281,8 +281,9 @@ protected:
|
|||
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
// virtual void PrePhysTick(float DeltaTime) override;
|
||||
virtual void PrePhysTick(float DeltaSeconds) override;
|
||||
virtual void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime) override;
|
||||
|
||||
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
||||
|
||||
virtual void SetUpSceneCaptureComponent(USceneCaptureComponent2D &SceneCapture) {}
|
||||
|
|
Loading…
Reference in New Issue