Added large map transform
This commit is contained in:
parent
e56470659a
commit
b3ea8d0acc
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue