restore old values
This commit is contained in:
parent
597bfbc27d
commit
43b4a1e179
|
@ -508,7 +508,7 @@ void AVegetationManager::SpawnSkeletalFoliages(TArray<FElementsToSpawn>& Element
|
||||||
if (Element.TileMeshComponent->IndicesInUse.Contains(Index))
|
if (Element.TileMeshComponent->IndicesInUse.Contains(Index))
|
||||||
continue;
|
continue;
|
||||||
const float Distance = FMath::Abs(FVector::Dist(Transform.GetLocation(), HeroLocation));
|
const float Distance = FMath::Abs(FVector::Dist(Transform.GetLocation(), HeroLocation));
|
||||||
if (Distance > (HideMaterialDistance * 3.0f))
|
if (Distance > HeroVehicle->GetDetectionSize())
|
||||||
continue;
|
continue;
|
||||||
bool Ok = EnableActorFromPool(Transform, Index, Element.TileMeshComponent, *Pool);
|
bool Ok = EnableActorFromPool(Transform, Index, Element.TileMeshComponent, *Pool);
|
||||||
if (Ok)
|
if (Ok)
|
||||||
|
@ -544,7 +544,7 @@ void AVegetationManager::DestroySkeletalFoliages()
|
||||||
continue;
|
continue;
|
||||||
const FVector Location = Actor.GlobalTransform.GetLocation();
|
const FVector Location = Actor.GlobalTransform.GetLocation();
|
||||||
const float Distance = FMath::Abs(FVector::Dist(Location, HeroLocation));
|
const float Distance = FMath::Abs(FVector::Dist(Location, HeroLocation));
|
||||||
if (Distance > (HideMaterialDistance * 4.0f))
|
if (Distance > HeroVehicle->GetDetectionSize())
|
||||||
{
|
{
|
||||||
Actor.DisableActor();
|
Actor.DisableActor();
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ public:
|
||||||
bool DebugMaterials {false};
|
bool DebugMaterials {false};
|
||||||
|
|
||||||
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
||||||
float HideMaterialDistance {300.0f};
|
float HideMaterialDistance {500.0f};
|
||||||
|
|
||||||
//Filters for debug
|
//Filters for debug
|
||||||
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
||||||
|
@ -109,7 +109,7 @@ public:
|
||||||
float SpawnScale {1.0f};
|
float SpawnScale {1.0f};
|
||||||
|
|
||||||
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
||||||
int32 InitialPoolSize {5};
|
int32 InitialPoolSize {10};
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
|
@ -354,7 +354,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UPROPERTY(Category = "CARLA Wheeled Vehicle", EditDefaultsOnly)
|
UPROPERTY(Category = "CARLA Wheeled Vehicle", EditDefaultsOnly)
|
||||||
float DetectionSize { 500.0f };
|
float DetectionSize { 750.0f };
|
||||||
|
|
||||||
UPROPERTY(Category = "CARLA Wheeled Vehicle", VisibleAnywhere, BlueprintReadOnly)
|
UPROPERTY(Category = "CARLA Wheeled Vehicle", VisibleAnywhere, BlueprintReadOnly)
|
||||||
FBox FoliageBoundingBox;
|
FBox FoliageBoundingBox;
|
||||||
|
|
Loading…
Reference in New Issue