Added large map transform

This commit is contained in:
Guillermo 2022-05-24 11:00:51 +02:00 committed by glopezdiest
parent e56470659a
commit b3ea8d0acc
2 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,6 @@
## Latest
* Fixed bug causing the scene lights to return an incorrect location at large maps.
* Fixed bug causing the `world.ground_projection()` function to return an incorrect location at large maps.
* Added failure state to vehicles, which can be retrieved by using `Vehicle.get_failure_state()`. Only Rollover failure state is currently supported.
* Fixed bug causing the TM to block the simulation when another client teleported a vehicle with no physics.

View File

@ -124,7 +124,14 @@ void UCarlaLight::SetLightState(carla::rpc::LightState LightState)
FVector UCarlaLight::GetLocation() const
{
return GetOwner()->GetActorLocation();
auto Location = GetOwner()->GetActorLocation();
ACarlaGameModeBase* GameMode = UCarlaStatics::GetGameMode(GetWorld());
ALargeMapManager* LargeMap = GameMode->GetLMManager();
if (LargeMap)
{
Location = LargeMap->LocalToGlobalLocation(Location);
}
return Location;
}
int UCarlaLight::GetId() const