GlobalOrbitPitchOffset

GlobalOrbitPitchOffset

#Overview

name: GlobalOrbitPitchOffset

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 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of GlobalOrbitPitchOffset is to provide a global vertical camera orientation offset for all world thumbnails in Unreal Engine 5. It is used in the thumbnail rendering system to adjust the pitch of the camera when generating thumbnails for world assets.

This setting variable is primarily used by the UnrealEd module, specifically within the thumbnail rendering subsystem. It is utilized by the UWorldThumbnailRenderer class, which is responsible for rendering thumbnails of world assets.

The value of this variable is set in the constructor of UWorldThumbnailRenderer, where it is initialized to 0.f. It is declared as a UPROPERTY with the ‘config’ specifier, which means its value can be modified through configuration files.

GlobalOrbitPitchOffset interacts with other variables, notably:

  1. ThumbnailInfo->OrbitPitch, which provides an additional, per-thumbnail pitch offset.
  2. GlobalOrbitYawOffset, which works similarly but for the yaw axis.
  3. ThumbnailInfo->OrbitYaw, which provides an additional, per-thumbnail yaw offset.

Developers should be aware that this variable affects all world thumbnails globally. Changing its value will impact the default vertical orientation of the camera for all world asset thumbnails in the project.

Best practices when using this variable include:

  1. Use it sparingly and only when a global adjustment is necessary for all world thumbnails.
  2. Consider using the per-thumbnail OrbitPitch setting in ThumbnailInfo for more granular control over individual world asset thumbnails.
  3. Test the impact of changes to this variable across various world assets to ensure the desired thumbnail representation is achieved consistently.
  4. Document any non-default values used for this variable to maintain consistency across the development team and for future reference.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditor.ini:136, section: [/Script/UnrealEd.WorldThumbnailRenderer]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/ThumbnailRendering/WorldThumbnailRenderer.h:33

Scope (from outer to inner):

file
class        class UWorldThumbnailRenderer : public UDefaultSizedThumbnailRenderer

Source code excerpt:

	/** Offset used to orient all worlds to show a more vertical camera, if necessary. Individual thumbnail infos can provide additional offset. */
	UPROPERTY(config)
	float GlobalOrbitPitchOffset;

	/** Offset used to orient all worlds to face the camera in degrees when using a perspective camera. Individual thumbnail infos can provide additional offset. */
	UPROPERTY(config)
	float GlobalOrbitYawOffset;

	/** If true, all world thumbnails will be rendered unlit. This is useful in games that have shared lighting in a common map */

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailRendering/WorldThumbnailRenderer.cpp:16

Scope (from outer to inner):

file
function     UWorldThumbnailRenderer::UWorldThumbnailRenderer

Source code excerpt:

	: Super(ObjectInitializer)
{
	GlobalOrbitPitchOffset = 0.f;
	GlobalOrbitYawOffset = 0.f;
	bUseUnlitScene = false;
	bAllowWorldThumbnails = false;
}

bool UWorldThumbnailRenderer::CanVisualizeAsset(UObject* Object)

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailRendering/WorldThumbnailRenderer.cpp:158

Scope (from outer to inner):

file
function     FSceneView* UWorldThumbnailRenderer::CreateView

Source code excerpt:

		}

		float OrbitPitch = GlobalOrbitPitchOffset + ThumbnailInfo->OrbitPitch;
		float OrbitYaw = GlobalOrbitYawOffset + ThumbnailInfo->OrbitYaw;
		float OrbitZoom = TargetDistance + ThumbnailInfo->OrbitZoom;

		// Ensure a minimum camera distance to prevent problems with really small objects
		const float MinCameraDistance = 48;
		OrbitZoom = FMath::Max<float>(MinCameraDistance, OrbitZoom);