update detection values
This commit is contained in:
parent
dc69873710
commit
c9df090311
Unreal/CarlaUE4/Plugins/Carla/Source/Carla
|
@ -508,7 +508,7 @@ void AVegetationManager::SpawnSkeletalFoliages(TArray<FElementsToSpawn>& Element
|
|||
if (Element.TileMeshComponent->IndicesInUse.Contains(Index))
|
||||
continue;
|
||||
const float Distance = FMath::Abs(FVector::Dist(Transform.GetLocation(), HeroLocation));
|
||||
if (Distance > (HideMaterialDistance * 2.0f))
|
||||
if (Distance > (HideMaterialDistance * 3.0f))
|
||||
continue;
|
||||
bool Ok = EnableActorFromPool(Transform, Index, Element.TileMeshComponent, *Pool);
|
||||
if (Ok)
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
bool DebugMaterials {false};
|
||||
|
||||
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
||||
float HideMaterialDistance {500.0f};
|
||||
float HideMaterialDistance {300.0f};
|
||||
|
||||
//Filters for debug
|
||||
UPROPERTY(Category = "CARLA Vegetation Spwaner", EditDefaultsOnly)
|
||||
|
|
|
@ -224,7 +224,7 @@ void ACarlaWheeledVehicle::UpdateDetectionBox()
|
|||
const TArray<int32> ACarlaWheeledVehicle::GetFoliageInstancesCloseToVehicle(const UInstancedStaticMeshComponent* Component) const
|
||||
{
|
||||
TRACE_CPUPROFILER_EVENT_SCOPE(ACarlaWheeledVehicle::GetFoliageInstancesCloseToVehicle);
|
||||
return Component->GetInstancesOverlappingSphere(FoliageBoundingBox.GetCenter(), DetectionSize, true);
|
||||
return Component->GetInstancesOverlappingBox(FoliageBoundingBox);
|
||||
}
|
||||
|
||||
FBox ACarlaWheeledVehicle::GetDetectionBox() const
|
||||
|
|
|
@ -354,7 +354,7 @@ private:
|
|||
|
||||
public:
|
||||
UPROPERTY(Category = "CARLA Wheeled Vehicle", EditDefaultsOnly)
|
||||
float DetectionSize { 750.0f };
|
||||
float DetectionSize { 500.0f };
|
||||
|
||||
UPROPERTY(Category = "CARLA Wheeled Vehicle", VisibleAnywhere, BlueprintReadOnly)
|
||||
FBox FoliageBoundingBox;
|
||||
|
|
Loading…
Reference in New Issue