10 #include "Components/SceneCaptureComponent2D.h" 11 #include "Kismet/GameplayStatics.h" 12 #include "ConstructorHelpers.h" 15 : Super(ObjectInitializer)
18 TEXT(
"Material'/Game/Carla/Static/GenericMaterials/00_MastersOpt/Screen_posProcess/M_screenDrops.M_screenDrops'")).Object;
21 TEXT(
"Material'/Game/Carla/Static/GenericMaterials/00_MastersOpt/Screen_posProcess/M_screenDust_wind.M_screenDust_wind'")).Object;
23 PrimaryActorTick.bCanEverTick =
false;
24 RootComponent = ObjectInitializer.CreateDefaultSubobject<USceneComponent>(
this, TEXT(
"RootComponent"));
39 TArray<AActor*> SensorActors;
40 UGameplayStatics::GetAllActorsOfClass(GetWorld(), ASceneCaptureCamera::StaticClass(), SensorActors);
41 for (
AActor* SensorActor : SensorActors)
45 Sensor->
GetCaptureComponent2D()->PostProcessSettings.AddBlendable(ActiveBlendable.Key, ActiveBlendable.Value);
54 #ifdef CARLA_WEATHER_EXTRA_LOG 55 UE_LOG(LogCarla, Log, TEXT(
"Changing weather:"));
70 #endif // CARLA_WEATHER_EXTRA_LOG void RefreshWeather(const FWeatherParameters &WeatherParameters)
float ScatteringIntensity
void SetDayNightCycle(const bool &active)
Update the day night cycle.
UMaterial * PrecipitationPostProcessMaterial
FWeatherParameters Weather
USceneCaptureComponent2D * GetCaptureComponent2D()
A sensor that captures images from the scene.
AWeather(const FObjectInitializer &ObjectInitializer)
void SetWeather(const FWeatherParameters &WeatherParameters)
Update the weather parameters without notifing it to the blueprint's event.
UMaterial * DustStormPostProcessMaterial
void CheckWeatherPostProcessEffects()
float PrecipitationDeposits
void NotifyWeather(ASensor *Sensor=nullptr)
Notifing the weather to the blueprint's event.
TMap< UMaterial *, float > ActiveBlendables
void ApplyWeather(const FWeatherParameters &WeatherParameters)
Update the weather parameters and notifies it to the blueprint's event.
float RayleighScatteringScale