MotionModeRadius
MotionModeRadius
#Overview
name: MotionModeRadius
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 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of MotionModeRadius is to control the radius of circular motion for particle systems in the Cascade particle editor within Unreal Engine 5. This variable is primarily used for visualization and debugging purposes in the editor, allowing developers to see how particles behave when the emitter is moving in a circular pattern.
The Cascade module, which is part of the Unreal Editor subsystem, relies on this setting variable. It is used specifically in the FCascade class, which handles the functionality of the Cascade particle editor.
The value of this variable is initially set from the EditorOptions in the InitCascade function. It can be modified by the user through the Cascade editor interface, specifically when calling the OnSetMotionRadius function.
MotionModeRadius interacts with other variables such as AccumulatedMotionTime, which is used to calculate the current position in the circular motion. It’s also related to bIsToggleMotion, which likely determines whether this motion mode is active.
Developers should be aware that this variable is used for editor visualization purposes only and does not affect the actual behavior of particles in the game. It’s a tool for testing and debugging particle systems under simulated movement conditions.
Best practices when using this variable include:
- Use it to test how particle systems behave under circular motion.
- Adjust the radius to match the scale of your particle system for meaningful visualization.
- Remember to disable motion mode (bIsToggleMotion) when not needed to avoid confusion.
- Consider how different radius values might affect the perceived behavior of your particle system and test accordingly.
- Use this in conjunction with other Cascade tools to get a comprehensive understanding of your particle system’s behavior under various conditions.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:606, section: [/Script/UnrealEd.CascadeOptions]
- INI Section:
/Script/UnrealEd.CascadeOptions
- Raw value:
150.0
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.cpp:306
Scope (from outer to inner):
file
function void FCascade::InitCascade
Source code excerpt:
bIsToggleMotion = false;
MotionModeRadius = EditorOptions->MotionModeRadius;
AccumulatedMotionTime = 0.0f;
TimeScale = CachedTimeScale = 1.0f;
bIsToggleLoopSystem = true;
bIsPendingReset = false;
ResetTime = BIG_NUMBER;
TotalTime = 0.0;
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.cpp:1599
Scope (from outer to inner):
file
function void FCascade::Tick
Source code excerpt:
AccumulatedMotionTime += CurrDeltaTime;
FVector Position;
Position.X = MotionModeRadius * FMath::Sin(AccumulatedMotionTime);
Position.Y = MotionModeRadius * FMath::Cos(AccumulatedMotionTime);
Position.Z = 0.0f;
ParticleSystemComponent->SetComponentToWorld(FTransform(Position));
}
if (ParticleSystemComponent->IsComponentTickEnabled())
{
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.cpp:2599
Scope (from outer to inner):
file
function void FCascade::MotionRadiusCommitted
Source code excerpt:
if (CommitInfo == ETextCommit::OnEnter)
{
MotionModeRadius = atof(TCHAR_TO_ANSI( *CommentText.ToString() ));
}
CloseEntryPopup();
}
void FCascade::SphereRadiusCommitted(const FText& CommentText, ETextCommit::Type CommitInfo)
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.cpp:3870
Scope (from outer to inner):
file
function void FCascade::OnSetMotionRadius
Source code excerpt:
void FCascade::OnSetMotionRadius()
{
FString DefaultText = FString::Printf(TEXT("%.2f"), MotionModeRadius);
TSharedRef<STextEntryPopup> TextEntry =
SNew(STextEntryPopup)
.Label(NSLOCTEXT("Cascade", "MotionRadius", "Motion Radius: "))
.DefaultText(FText::FromString( DefaultText ) )
.OnTextCommitted(this, &FCascade::MotionRadiusCommitted)
.SelectAllTextWhenFocused(true)
#Loc: <Workspace>/Engine/Source/Editor/Cascade/Private/Cascade.h:481
Scope (from outer to inner):
file
class class FCascade : public ICascade, public FGCObject, public FTickableEditorObject, public FNotifyHook, public FCurveEdNotifyInterface, public FEditorUndoClient
Source code excerpt:
/** View/draw info */
bool bIsToggleMotion;
float MotionModeRadius;
float AccumulatedMotionTime;
float TimeScale;
float CachedTimeScale;
bool bIsToggleLoopSystem;
bool bIsPendingReset;
double TotalTime;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Preferences/CascadeOptions.h:169
Scope (from outer to inner):
file
class class UCascadeOptions : public UObject
Source code excerpt:
/** The radius of the motion mode */
UPROPERTY(EditAnywhere, config, Category=Options)
float MotionModeRadius;
};