bUseUE3OrbitControls

bUseUE3OrbitControls

#Overview

name: bUseUE3OrbitControls

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bUseUE3OrbitControls is to control the camera orbit behavior in Unreal Engine’s editor viewports. It determines whether the editor should use UE3-style orbit controls or the default UE4/UE5 orbit controls.

This setting variable is primarily used by the editor viewport subsystem, specifically in various editor viewport clients such as the LidarPointCloudEditorViewportClient, CascadeEdPreviewViewportClient, StaticMeshEditorViewportClient, and the general EditorViewportClient.

The value of this variable is set in the LevelEditorViewportSettings class, which is likely configurable through the editor’s project settings or preferences.

This variable interacts with other input controls, particularly the Alt key and mouse drag combination for the default controls, or the ‘L’ and ‘U’ keys for UE3-style controls.

Developers must be aware that changing this setting will affect the user experience for all users of the editor, potentially causing confusion if users are accustomed to a particular control scheme. It’s important to consider the impact on workflow and user expectations before modifying this setting.

Best practices when using this variable include:

  1. Maintaining consistency across projects to avoid user confusion.
  2. Clearly documenting the chosen control scheme for team members.
  3. Considering user feedback and preferences when deciding which control scheme to use.
  4. Ensuring that any custom tools or plugins that interact with viewport navigation are compatible with both control schemes.
  5. Testing thoroughly after changing this setting to ensure all viewport-related functionality works as expected.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:344, section: [/Script/UnrealEd.LevelEditorViewportSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Enterprise/LidarPointCloud/Source/LidarPointCloudEditor/Private/LidarPointCloudEditorViewportClient.cpp:93

Scope (from outer to inner):

file
function     bool FLidarPointCloudEditorViewportClient::ShouldOrbitCamera

Source code excerpt:

bool FLidarPointCloudEditorViewportClient::ShouldOrbitCamera() const
{
	return GetDefault<ULevelEditorViewportSettings>()->bUseUE3OrbitControls || FEditorViewportClient::ShouldOrbitCamera();
}

void FLidarPointCloudEditorViewportClient::PerspectiveCameraMoved()
{
	FEditorViewportClient::PerspectiveCameraMoved();

#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/CascadePreviewViewportClient.cpp:785

Scope (from outer to inner):

file
function     bool FCascadeEdPreviewViewportClient::ShouldOrbitCamera

Source code excerpt:

bool FCascadeEdPreviewViewportClient::ShouldOrbitCamera() const
{
	if (GetDefault<ULevelEditorViewportSettings>()->bUseUE3OrbitControls)
	{
		// this editor orbits always if ue3 orbit controls are enabled
		return true;
	}

	return FEditorViewportClient::ShouldOrbitCamera();

#Loc: <Workspace>/Engine/Source/Editor/StaticMeshEditor/Private/StaticMeshEditorViewportClient.cpp:470

Scope (from outer to inner):

file
function     bool FStaticMeshEditorViewportClient::ShouldOrbitCamera

Source code excerpt:

bool FStaticMeshEditorViewportClient::ShouldOrbitCamera() const
{
	if (GetDefault<ULevelEditorViewportSettings>()->bUseUE3OrbitControls)
	{
		// this editor orbits always if ue3 orbit controls are enabled
		return true;
	}

	return FEditorViewportClient::ShouldOrbitCamera();

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/LevelEditorViewportSettings.h:371

Scope (from outer to inner):

file
class        class ULevelEditorViewportSettings : public UObject

Source code excerpt:

	/** When checked, orbit the camera by using the L or U keys when unchecked, Alt and Left Mouse Drag will orbit around the look at point */
	UPROPERTY(EditAnywhere, config, Category=Controls, meta=(DisplayName="Use UE3 Orbit Controls"), AdvancedDisplay)
	bool bUseUE3OrbitControls;

	/** Direction of the scroll gesture for 3D viewports */
	UPROPERTY(EditAnywhere, config, Category=Controls, meta=(DisplayName="Scroll gesture direction for 3D viewports"))
	EScrollGestureDirection ScrollGestureDirectionFor3DViewports;

	/** Direction of the scroll gesture for orthographic viewports */

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorViewportClient.cpp:5062

Scope (from outer to inner):

file
function     bool FEditorViewportClient::ShouldOrbitCamera

Source code excerpt:

		bool bDesireOrbit = false;

		if (!GetDefault<ULevelEditorViewportSettings>()->bUseUE3OrbitControls)
		{
			bDesireOrbit = IsAltPressed() && !IsCtrlPressed() && !IsShiftPressed();
		}
		else
		{
			bDesireOrbit = Viewport->KeyState(EKeys::U) || Viewport->KeyState(EKeys::L);