Description

In the Level Editor, dragging the mouse while the "Alt" key is pressed performs one of the "Orbit" movements: OrbitRotation, OrbitPan, OrbitZoom.

The same can be done while Piloting an actor. However, "OrbitPan" mode does not work correctly while piloting is active. It appears that, besides panning, the manipulation also simultaneously brings the camera closer to/farther from the lookat point.

A preliminary investigation of this issue showed that the following call chain is executed while in OrbitPan mode (see "call stack" section").

On the call chain, line [D] is only executed while piloting (explanation in code comment: "Need to disable orbit camera before setting actor position so that the viewport camera location is converted back"). Because of this, Orbit mode is enabled (line A) and disabled (line D) on every frame. In contrast, when not piloting, Orbit mode is enabled once and re-enabled every frame (a no-op) during the manipulation.

One of the effects of ToggleOrbitCamera(true) is to set the ViewLocation and ViewRotation to the Origin and Rotator of a computed OrbitMatrix, seemingly to change the coordinate space where the remaining orbit calculations take place. However, the new location resulting from line C above can be observed to be back at the original coordinate space (easy to see when following the execution using the provided "steps to reproduce"). In the next frame, ToggleOrbitCamera(true) repeats the space conversion when piloting an actor (because orbit mode was turned off and now back on), but it does not perform the conversion when not piloting (because orbit mode is not turned off every frame in this situation). This difference in the ViewTransform affects the result of line C on every subsequent frame. Interestingly, that result seems correct when not piloting (and therefore when ToggleOrbitCamera() does not get a chance to perform its intended coordinate transformation), but incorrect when piloting (when ToggleOrbitCamera() does what it is supposedly expected to do).

Examining the calculation performed on line C more closely on each situation, we can see that ComputeOrbitMatrix() uses the size of vector "(ViewLocation - LookAt)", which is where the difference in behavior comes from (ViewLocation seems to not be in the required coordinate frame for this calculation to yield the expected result in one of the two situations). Also, examining the result of line C more closely, we can see that it is also wrong on the first frame of Orbit-Pan manipulation on both situations. When piloting, every frame is a "first frame of Orbit-Pan manipulation", so the error compounds. When not piloting, the error only happens on the actual first frame of manipulation, so it goes by unnoticed.

The right fix for this is still unclear. But a workaround is to prevent ToggleOrbitCamera(true) from changing the ViewLocation (but allow it to change LookAtLocation) when in Orbit-Pan mode, as suggested in the linked EPS thread.

Steps to Reproduce

Note: Repros on 4.27 up to 5.7 and source

1. Create a new map from the Blank template
2. Place a Cylinder at (0,0,0)
3. Place a Cube at (300,0,300) with rotation (0,-45,180)
4. Right click the cube, choose "Move Camera to Object"
5. Test camera "Orbit Pan Mode" behavior:
5.1. Press 'F' to set the Orbit LookAt point
5.2. Hold Alt+MMB, then drag left and right. Observe the correct behavior.
6. Pilot the cube (right click + "pilot")
7. While piloting, repeat step 5 and observe how the behavior is incorrect.

Callstack

(line numbers according to UE 5.7, some lines annotated with letters for referencing)

FLevelEditorViewportClient::Tick() [:2990]
FEditorViewportClient::Tick() [:1728]
FEditorViewportClient::UpdateMouseDelta() [:2720]
FEditorViewportClient::PeformDefaultCameraMovement() [:2756]
FEditorViewportClient::InputAxisForOrbit() [:2911]
<'else' block>
[A] FEditorViewportClient::ToggleOrbitCamera(true)
(...)
if (IsOrbitPanMode())
(...)
FEditorViewportClient::SetLookAtLocation( GetLookAtLocation() + TransformedDelta )
[C] FEditorViewportClient::SetViewLocation(ViewTransform.ComputeOrbitMatrix().Inverse().GetOrigin())
FEditorViewportClient::PeformDefaultCameraMovement() [:2775]
FEditorViewportClient::MoveViewportCamera() [:5898]
FEditorViewportClient::MoveViewportPerspectiveCamera() [:6045]
FLevelEditorViewportClient::PerspectiveCameraMoved() [:2688]
FLevelEditorViewportClient::MoveLockedActorToCamera() [:4182]
if (ActiveActorLock) [:4198]
[D] FEditorViewportClient::ToggleOrbitCamera(false)

Have Comments or More Details?

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

0
Login to Vote

Unresolved
CreatedNov 18, 2025
UpdatedFeb 23, 2026
View Jira Issue