Description

Note: This bug has been observed in all tested engine versions, from UE 4.24 to UE 5.3 and in ue-main.

When shift+selecting multiple actors in the Level Editor, the currently-active transformation widget snaps to the last actor selected and assumes its local transform when in the local-space mode. Using the widget to translate/rotate/scale the selected actors works fine. But when duplicating the selected actors by alt+dragging, the widget snaps to the clone of the last actor placed in the level, instead of the last actor selected, and the following manipulation takes place in the wrong coordinate system when those two are not the same.

The user that made the initial report tracked down the issue to what appears to be the correct root cause, which is summarized below after further testing:

  • The coordinate system of the transformation comes from FEditorModeTools::GetLocalCoordinateSystem() [[Engine\Source\Editor\UnrealEd\Private\EditorModeManager.cpp:1003], which uses the last element selected as reference.
  • The actor duplication is performed by FLevelEditorViewportClient::InputWidgetDelta() [Engine\Source\Editor\UnrealEd\Private\LevelEditorViewport.cpp:2821]. First it does the duplication itself by using UUnrealEdEngine::CopyActors() and UUnrealEdEngine::PasteActors() in file [Engine\Source\Editor\UnrealEd\Private\EditorActor.cpp]. The "Copy" function uses "ULevelExporterT3D::ExportText()" to serialize the selection, which is done in the order the actors are stored in the level array, instead of in the selection array. The "Paste" function imports that serialization to create and return the clones (in the same order of creation from the originals, not in the order of selection). Afterwards, FLevelEditorViewportClient::InputWidgetDelta() sets the selection to the actors returned by PasteActors(), so that manipulation can proceed on the clones instead of the originals.
  • The original selection and the clone selection are stored in different orders, which makes the coordinate space of the manipulation change to an incorrect one.
Steps to Reproduce
  • Open the Editor and create a new basic level.
  • Create 2 cubes side-by-side on the floor.
  • Rotate one of the cubes (suggestion: 45 degrees in the vertical axis)
  • Shift+select both cubes **starting with the last one created**
  • With the translation widget active, alt+drag it in the x or y axis

--> After the actors are duplicated, the translation widget's position and rotation will snap to the wrong actor and follow from there, sometimes even with a wrong translation/rotation offset that makes it impossible to continue the manipulation.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-208861 in the post.

2
Login to Vote

Duplicate
ComponentUE - Editor - Workflow Systems
Affects Versions5.3.2
CreatedMar 4, 2024
ResolvedMar 14, 2024
UpdatedJun 17, 2024
View Jira Issue