Fixed sensor_tick on cameras
This commit is contained in:
parent
22c3e9cf55
commit
7e736696e3
|
@ -30,5 +30,9 @@ ADepthCamera::ADepthCamera(const FObjectInitializer &ObjectInitializer)
|
|||
|
||||
void ADepthCamera::SendPixels(UWorld *World, ELevelTick TickType, float DeltaSeconds)
|
||||
{
|
||||
if(ReadyToCapture)
|
||||
{
|
||||
FPixelReader::SendPixelsInRenderThread(*this);
|
||||
ReadyToCapture = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,5 +24,9 @@ ASceneCaptureCamera::ASceneCaptureCamera(const FObjectInitializer &ObjectInitial
|
|||
|
||||
void ASceneCaptureCamera::SendPixels(UWorld *World, ELevelTick TickType, float DeltaSeconds)
|
||||
{
|
||||
if(ReadyToCapture)
|
||||
{
|
||||
FPixelReader::SendPixelsInRenderThread(*this);
|
||||
ReadyToCapture = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -505,6 +505,7 @@ void ASceneCaptureSensor::Tick(float DeltaTime)
|
|||
ImageWidth,
|
||||
ImageWidth / FMath::Tan(CaptureComponent2D->FOVAngle));
|
||||
|
||||
ReadyToCapture = true;
|
||||
}
|
||||
|
||||
void ASceneCaptureSensor::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
||||
|
|
|
@ -307,4 +307,6 @@ protected:
|
|||
UPROPERTY(EditAnywhere)
|
||||
bool bEnablePostProcessingEffects = true;
|
||||
|
||||
bool ReadyToCapture = false;
|
||||
|
||||
};
|
||||
|
|
|
@ -26,5 +26,9 @@ ASemanticSegmentationCamera::ASemanticSegmentationCamera(
|
|||
|
||||
void ASemanticSegmentationCamera::SendPixels(UWorld *World, ELevelTick TickType, float DeltaSeconds)
|
||||
{
|
||||
if(ReadyToCapture)
|
||||
{
|
||||
FPixelReader::SendPixelsInRenderThread(*this);
|
||||
ReadyToCapture = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue