Avoid sensors to go dormant if they are far from vehicle.

This commit is contained in:
LuisPoveda 2023-02-21 13:01:48 +01:00 committed by bernat
parent 86daa78794
commit 3b86f58e68
1 changed files with 2 additions and 2 deletions

View File

@ -777,7 +777,7 @@ void ALargeMapManager::CheckActiveActors()
float DistanceSquared = (RelativeLocation - HeroLocation).SizeSquared();
if (DistanceSquared > ActorStreamingDistanceSquared)
if (DistanceSquared > ActorStreamingDistanceSquared && View->GetActorType() != FCarlaActor::ActorType::Sensor)
{
// Save to temporal container. Later will be converted to dormant
ActiveToDormantActors.Add(Id);