diff --git a/Source/HoudiniEngineRuntime/Private/HoudiniEngineRuntimeUtils.cpp b/Source/HoudiniEngineRuntime/Private/HoudiniEngineRuntimeUtils.cpp index 3d43cf5318..6d9d5fecc3 100755 --- a/Source/HoudiniEngineRuntime/Private/HoudiniEngineRuntimeUtils.cpp +++ b/Source/HoudiniEngineRuntime/Private/HoudiniEngineRuntimeUtils.cpp @@ -520,9 +520,11 @@ FHoudiniEngineRuntimeUtils::CalculateHoudiniLandscapeTransform(ULandscapeInfo* L FVector3d ExtentMax = FVector3d(Extent.Max.X * LandscapeScale.X, Extent.Max.Y * LandscapeScale.Y, 1.0); // Add section base offset to the landscape transform + FTransform Trans = FTransform::Identity; + Trans.CopyRotation(OutTransform); + const FVector Offset = Trans.TransformPosition( FVector(ExtentCenter.X * LandscapeScale.X , ExtentCenter.Y * LandscapeScale.Y, 0)); FVector3d Loc = OutTransform.GetLocation(); - Loc.X += ExtentCenter.X * LandscapeScale.X; - Loc.Y += ExtentCenter.Y * LandscapeScale.Y; + Loc += Offset; OutTransform.SetLocation(Loc);