Description

From UDN:

When using the Combined Translate and Rotate Mode we run into an issue where the rotation arrow moves twice as fast as the coordinate frame. The object itself rotates correctly, but if we release the mouse button and then click on the arrow again the rotation quickly snaps to the double rotated value. This only occurs when using local space instead of global space.

The fix is pretty easy and goes into:

Engine/Source/Editor/UnrealEd/Private/UnrealWidgetRender.cpp in the functionFWidget::Render_TranslateRotateZ()

// The offending lines: 
FVector XAxis = CustomCoordSystem.TransformPosition( FVector(1,0,0).RotateAngleAxis( (EditorModeTools ? EditorModeTools->TranslateRotateXAxisAngle : 0 ), FVector(0,0,1)) ); FVector YAxis = CustomCoordSystem.TransformPosition( FVector(0,1,0).RotateAngleAxis( (EditorModeTools ? EditorModeTools->TranslateRotateXAxisAngle : 0 ), FVector(0,0,1)) ); 

// Replace them with these lines: 
FVector XAxis, YAxis; if(Space.bIsLocalSpace) { // Coordinate frame applied alone XAxis = CustomCoordSystem.TransformPosition(FVector(1,0,0)); YAxis = CustomCoordSystem.TransformPosition(FVector(0,1,0)); } else { // Original application of coordinate frame and the local rotation XAxis = CustomCoordSystem.TransformPosition(FVector(1,0,0).RotateAngleAxis((EditorModeTools ? EditorModeTools->TranslateRotateXAxisAngle :0),FVector(0,0,1))); YAxis = CustomCoordSystem.TransformPosition(FVector(0,1,0).RotateAngleAxis((EditorModeTools ? EditorModeTools->TranslateRotateXAxisAngle :0),FVector(0,0,1))); }

What we are doing is locking the rotation arrow to the X-axis when we are in local space. The frame rotates to match the local transform and the big arrow rotates in lock step with it. In global space the frame is not rotated so we need to apply the local frame and the current rotation.

Have Comments or More Details?

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

0
Login to Vote

Unresolved
ComponentUE - Editor - Workflow Systems
Affects Versions5.3
Target Fix5.5
CreatedDec 22, 2023
UpdatedMay 9, 2024