Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Landscape] Fix bug landscape transform offset not taking care of rotation #204

Open
wants to merge 1 commit into
base: Houdini19.5-Unreal5.00
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down