Avoid sensors to go dormant if they are far from vehicle.
This commit is contained in:
parent
86daa78794
commit
3b86f58e68
|
@ -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);
|
||||
|
@ -1076,7 +1076,7 @@ void ALargeMapManager::PrintMapInfo()
|
|||
int LastMsgIndex = TilesDistMsgIndex;
|
||||
GEngine->AddOnScreenDebugMessage(LastMsgIndex++, MsgTime, FColor::White,
|
||||
FString::Printf(TEXT("\nActor Global Position: %s km"), *(FDVector(CurrentActorPosition) / (1000.0 * 100.0)).ToString()) );
|
||||
|
||||
|
||||
FIntVector CurrentTile = GetTileVectorID(CurrentActorPosition);
|
||||
GEngine->AddOnScreenDebugMessage(LastMsgIndex++, MsgTime, FColor::White,
|
||||
FString::Printf(TEXT("\nActor Current Tile: %d_%d"), CurrentTile.X, CurrentTile.Y ));
|
||||
|
|
Loading…
Reference in New Issue