Skip to content

Commit

Permalink
Fix landscapes getting incorrect transforms when using Old Input System.
Browse files Browse the repository at this point in the history
  • Loading branch information
andys-sidefx committed Jun 6, 2023
1 parent bbc5387 commit 5230180
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Source/HoudiniEngine/Private/HoudiniInputTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3427,6 +3427,10 @@ FHoudiniInputTranslator::HapiCreateInputNodeForLandscape(
Landscape, InInput, InputNodeId, LandscapeName, InputNodeHandle, bInputNodesCanBeDeleted))
return false;


FTransform Transform = InObject->Transform;
Transform.SetScale3D(FVector::OneVector);

InObject->InputNodeHandle = InputNodeHandle;
if (bUseRefCountedInputSystem)
{
Expand All @@ -3437,9 +3441,6 @@ FHoudiniInputTranslator::HapiCreateInputNodeForLandscape(
if (!FHoudiniEngineUtils::GetHAPINodeId(InputNodeHandle, LandscapeNodeId))
return false;

FTransform Transform = InObject->Transform;
Transform.SetScale3D(FVector::OneVector);

if (!HapiCreateOrUpdateGeoObjectMergeAndSetTransform(
ParentNodeId,
LandscapeNodeId,
Expand All @@ -3458,7 +3459,7 @@ FHoudiniInputTranslator::HapiCreateInputNodeForLandscape(
InObject->InputObjectNodeId = (int32)FHoudiniEngineUtils::HapiGetParentNodeId(InputNodeId);
InObject->Update(Landscape);

if (!HapiSetGeoObjectTransform(InObject->InputObjectNodeId, InObject->Transform))
if (!HapiSetGeoObjectTransform(InObject->InputObjectNodeId, Transform))
return false;
}

Expand Down

0 comments on commit 5230180

Please sign in to comment.