Why is moving or rotating Level Instances inconsistent?

Hopefully this works for everyone else having this problem. Instead of directly changing the Transform, I used the FLevelUtils::ApplyLevelTransform to apply the transform and called GetWorld()->UpdateLevelStreaming().

#include "LevelUtils.h"
void ADungeonManager::PlaceRooms()
{
        // Place rooms 1000 units away from each other
	for (int Index = 0; Index < StreamedLevels.Num(); Index++)
	{
			FLevelUtils::ApplyLevelTransform(StreamedLevels[Index]->GetLoadedLevel(), FTransform(FRotator(0.0f, 0.0f, 0.0f), FVector((Index + 1) * 1000, 0.0f, 0.0f), FVector(1, 1, 1)));
	GetWorld()->UpdateLevelStreaming();
	}
}
1 Like