GlobalOrbitYawOffset
GlobalOrbitYawOffset
#Overview
name: GlobalOrbitYawOffset
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 GlobalOrbitYawOffset is to provide a global offset for the yaw (horizontal rotation) of the camera when rendering world thumbnails in Unreal Engine 5. This variable is used in the thumbnail rendering system, specifically for world assets.
The Unreal Engine subsystem that relies on this setting variable is the thumbnail rendering system, which is part of the UnrealEd module. This can be seen from the file paths and class names in the callsites.
The value of this variable is set in the constructor of the UWorldThumbnailRenderer class, where it is initialized to 0.f. It can also be configured through the UPROPERTY(config) attribute, allowing it to be set in configuration files.
GlobalOrbitYawOffset interacts with other variables, notably:
- ThumbnailInfo->OrbitYaw, which provides an additional, per-thumbnail yaw offset.
- GlobalOrbitPitchOffset and ThumbnailInfo->OrbitPitch, which work similarly for the pitch (vertical rotation) of the camera.
- TargetDistance and ThumbnailInfo->OrbitZoom, which affect the camera’s distance from the rendered object.
Developers must be aware that this variable affects all world thumbnails globally. Changing this value will impact the default orientation of all world thumbnails in the editor, which could affect how assets are presented in the content browser.
Best practices when using this variable include:
- Use it sparingly and consider the impact on all world thumbnails before changing its value.
- If only specific thumbnails need adjustment, prefer using the per-thumbnail OrbitYaw property instead of the global offset.
- Consider the interaction with other camera-related variables (pitch, zoom) to ensure a consistent and visually appealing thumbnail rendering across all world assets.
- Document any non-zero values used for this variable, as it may not be immediately obvious to other developers why thumbnails are oriented differently from the default.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditor.ini:137, section: [/Script/UnrealEd.WorldThumbnailRenderer]
- INI Section:
/Script/UnrealEd.WorldThumbnailRenderer
- Raw value:
0
- Is Array:
False
#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:37
Scope (from outer to inner):
file
class class UWorldThumbnailRenderer : public UDefaultSizedThumbnailRenderer
Source code excerpt:
/** 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 */
UPROPERTY(config)
bool bUseUnlitScene;
/** If false, all world thumbnails rendering will be disabled */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/ThumbnailRendering/WorldThumbnailRenderer.cpp:17
Scope (from outer to inner):
file
function UWorldThumbnailRenderer::UWorldThumbnailRenderer
Source code excerpt:
{
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:159
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);