File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Source/PrefabricatorRuntime Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ FVector FPrefabricatorAssetUtils::FindPivot(const TArray<AActor*>& InActors)
3232 FBox ActorBounds = FPrefabTools::GetPrefabBounds (Actor, false );
3333 Bounds += ActorBounds;
3434 }
35+
36+ AActor* FirstActor = InActors[0 ];
3537
36- switch (GetDefault< UPrefabricatorSettings>()->PivotPosition )
38+ switch (GetDefault<UPrefabricatorSettings>()->PivotPosition )
3739 {
3840 case EPrefabricatorPivotPosition::ExtremeLeft:
3941 Pivot = Bounds.GetCenter () - Bounds.GetExtent ();
@@ -44,6 +46,9 @@ FVector FPrefabricatorAssetUtils::FindPivot(const TArray<AActor*>& InActors)
4446 case EPrefabricatorPivotPosition::Center:
4547 Pivot = Bounds.GetCenter ();
4648 break ;
49+ case EPrefabricatorPivotPosition::FirstActor:
50+ Pivot = FirstActor->GetActorLocation ();
51+ return Pivot;
4752 default :;
4853 }
4954 Pivot.Z = Bounds.Min .Z ;
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ enum class EPrefabricatorPivotPosition : uint8
1111{
1212 ExtremeLeft,
1313 ExtremeRight,
14- Center
14+ Center,
15+ FirstActor
1516};
1617
1718/* *
You can’t perform that action at this time.
0 commit comments