bCustomCameraAlignEmitter
bCustomCameraAlignEmitter
#Overview
name: bCustomCameraAlignEmitter
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 bCustomCameraAlignEmitter is to control whether a custom camera alignment is used for emitter actors in the Unreal Engine editor. This setting is primarily related to the editor’s viewport and camera behavior when interacting with particle emitters.
This setting variable is used in the UnrealEd module, specifically within the UEditorEngine class and the ActorElementEditorViewportInteractionCustomization. It’s part of the editor’s functionality for handling camera positioning and focusing on actors in the viewport.
The value of this variable is set through the UPROPERTY(config) macro, which means it’s likely configured in an INI file and loaded when the editor starts.
bCustomCameraAlignEmitter interacts with another variable called CustomCameraAlignEmitterDistance. When bCustomCameraAlignEmitter is true, CustomCameraAlignEmitterDistance is used to determine the distance at which the camera is placed from an emitter actor.
Developers should be aware that this variable affects how the editor camera behaves when focusing on or aligning with emitter actors. When enabled, it overrides the default camera positioning behavior for emitters.
Best practices when using this variable include:
- Consider the impact on editor usability when enabling or disabling this feature.
- Ensure that CustomCameraAlignEmitterDistance is set to an appropriate value when bCustomCameraAlignEmitter is enabled.
- Be consistent in its use across the project to maintain a uniform editor experience.
- Document any custom settings in the project documentation to inform other team members about non-default editor behaviors.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1829, section: [/Script/UnrealEd.EditorEngine]
- INI Section:
/Script/UnrealEd.EditorEngine
- Raw value:
true
- 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/Editor/EditorEngine.h:501
Scope (from outer to inner):
file
class class UEditorEngine : public UEngine
Source code excerpt:
/** If "Camera Align" emitter handling uses a custom zoom or not */
UPROPERTY(config)
uint32 bCustomCameraAlignEmitter:1;
/** The distance to place the camera from an emitter actor when custom zooming is enabled */
UPROPERTY(config)
float CustomCameraAlignEmitterDistance;
/** If true, then draw sockets when socket snapping is enabled in 'g' mode */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorServer.cpp:4749
Scope (from outer to inner):
file
function void UEditorEngine::MoveViewportCamerasToActor
Source code excerpt:
const bool bActorIsEmitter = (Cast<AEmitter>(AlignActor) != NULL);
if (bActorIsEmitter && bCustomCameraAlignEmitter)
{
const FVector DefaultExtent(CustomCameraAlignEmitterDistance, CustomCameraAlignEmitterDistance, CustomCameraAlignEmitterDistance);
const FBox DefaultSizeBox(AlignActor->GetActorLocation() - DefaultExtent, AlignActor->GetActorLocation() + DefaultExtent);
BoundingBox += DefaultSizeBox;
}
else if (USceneComponent* RootComponent = AlignActor->GetRootComponent())
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Elements/Actor/ActorElementEditorViewportInteractionCustomization.cpp:239
Scope (from outer to inner):
file
function bool FActorElementEditorViewportInteractionCustomization::GetFocusBounds
Source code excerpt:
const bool bActorIsEmitter = (Cast<AEmitter>(Actor) != nullptr);
if (bActorIsEmitter && GEditor && GEditor->bCustomCameraAlignEmitter)
{
const float CustomCameraAlignEmitterDistance = GEditor->CustomCameraAlignEmitterDistance;
const FVector DefaultExtent(CustomCameraAlignEmitterDistance, CustomCameraAlignEmitterDistance,
CustomCameraAlignEmitterDistance);
const FBox DefaultSizeBox(Actor->GetActorLocation() - DefaultExtent, Actor->GetActorLocation() + DefaultExtent);
BoundingBox += DefaultSizeBox;