From 1757a145498aa12fd1e34481eb7c19a5db0b8105 Mon Sep 17 00:00:00 2001 From: Ton Sharp Date: Thu, 9 Jan 2025 00:23:21 +0200 Subject: [PATCH] Removed reset world position This is mess up whole levels like: https://forums.unrealengine.com/t/airsim-prevents-low-level-details-crowd-and-traffic-from-being-drawned-in-cityscape-demo/571506/2 https://www.unrealengine.com/marketplace/en-US/product/modular-neighborhood-pack --- Unreal/Plugins/AirSim/Source/SimMode/SimModeBase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Unreal/Plugins/AirSim/Source/SimMode/SimModeBase.cpp b/Unreal/Plugins/AirSim/Source/SimMode/SimModeBase.cpp index cee8ca77e9..29d33cda37 100644 --- a/Unreal/Plugins/AirSim/Source/SimMode/SimModeBase.cpp +++ b/Unreal/Plugins/AirSim/Source/SimMode/SimModeBase.cpp @@ -112,7 +112,9 @@ void ASimModeBase::BeginPlay() player_loc = player_start_transform.GetLocation(); // Move the world origin to the player's location (this moves the coordinate system and adds // a corresponding offset to all positions to compensate for the shift) - this->GetWorld()->SetNewWorldOrigin(FIntVector(player_loc) + this->GetWorld()->OriginLocation); + // and mess up whole level!!! + //this->GetWorld()->SetNewWorldOrigin(FIntVector(player_loc) + this->GetWorld()->OriginLocation); + // Regrab the player's position after the offset has been added (which should be 0,0,0 now) player_start_transform = fpv_pawn->GetActorTransform(); global_ned_transform_.reset(new NedTransform(player_start_transform,