bAllowSimultaneousWorldScalingAndRotation
bAllowSimultaneousWorldScalingAndRotation
#Overview
name: bAllowSimultaneousWorldScalingAndRotation
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 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bAllowSimultaneousWorldScalingAndRotation is to control whether users can simultaneously rotate and scale the world in the Unreal Engine viewport using two-handed gestures.
This setting variable is primarily used in the ViewportInteraction module, specifically within the ViewportWorldInteraction system. It affects how the engine interprets and responds to user input for world manipulation in the viewport.
The value of this variable is set in the UVISettings class, which is likely configurable through the project settings or engine configuration files. It is defined as a bitfield within the UVISettings class, indicating it’s a boolean flag.
This variable interacts closely with the LockedWorldDragMode enum, which determines the current state of world manipulation (Unlocked, OnlyScaling, or OnlyRotating).
Developers must be aware that this setting significantly impacts the user experience when manipulating the world in the viewport. When disabled, the system will detect whether to rotate or scale based on the initial gesture, potentially providing more controlled but less flexible interaction.
Best practices when using this variable include:
- Consider the target audience and their familiarity with 3D manipulation when deciding whether to enable or disable this feature.
- Ensure proper documentation for users about how world manipulation behaves based on this setting.
- Test thoroughly with both settings to ensure smooth user experience in all scenarios.
- Consider providing in-editor UI options to toggle this setting for quick comparisons.
- Be aware of potential conflicts or unexpected behavior when combining this with other viewport interaction settings or custom manipulation tools.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorSettings.ini:59, section: [/Script/VREditor.VRModeSettings]
- INI Section:
/Script/VREditor.VRModeSettings
- 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/ViewportInteraction/Private/ViewportWorldInteraction.cpp:1900
Scope: file
Source code excerpt:
if( bWithTwoHands )
{
if(!GetDefault<UVISettings>()->bAllowSimultaneousWorldScalingAndRotation &&
LockedWorldDragMode == ELockedWorldDragMode::Unlocked )
{
const bool bHasDraggedEnoughToScale = FMath::Abs(GizmoScaleSinceDragStarted) >= VI::WorldScalingDragThreshold->GetFloat();
if (bHasDraggedEnoughToScale)
{
LockedWorldDragMode = ELockedWorldDragMode::OnlyScaling;
#Loc: <Workspace>/Engine/Source/Editor/ViewportInteraction/Private/ViewportWorldInteraction.cpp:1932
Scope: file
Source code excerpt:
(
(
(GetDefault<UVISettings>()->bAllowSimultaneousWorldScalingAndRotation)
&&
(LockedWorldDragMode == ELockedWorldDragMode::Unlocked)
)
||
(LockedWorldDragMode == ELockedWorldDragMode::OnlyScaling)
);
#Loc: <Workspace>/Engine/Source/Editor/ViewportInteraction/Private/ViewportWorldInteraction.cpp:1945
Scope: file
Source code excerpt:
(
(
(GetDefault<UVISettings>()->bAllowSimultaneousWorldScalingAndRotation)
&&
(LockedWorldDragMode == ELockedWorldDragMode::Unlocked)
)
||
(LockedWorldDragMode == ELockedWorldDragMode::OnlyRotating)
);
#Loc: <Workspace>/Engine/Source/Editor/ViewportInteraction/Public/VISettings.h:33
Scope (from outer to inner):
file
class class UVISettings : public UObject
Source code excerpt:
/** When enabled, you can freely rotate and scale the world with two hands at the same time. Otherwise, we'll detect whether to rotate or scale depending on how much of either gesture you initially perform. */
UPROPERTY(EditAnywhere, config, Category = "World Movement")
uint32 bAllowSimultaneousWorldScalingAndRotation : 1;
};