ShowFlag.ForceFeedbackRadius
ShowFlag.ForceFeedbackRadius
#Overview
name: ShowFlag.ForceFeedbackRadius
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allows to override a specific showflag (works in editor and game, \
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ShowFlag.ForceFeedbackRadius is to control the visibility of force feedback radii in the Unreal Engine editor. It is primarily used for visualization and debugging purposes in the editor environment.
This setting variable is primarily used by the Editor subsystem, specifically within the ComponentVisualizers module. It allows developers to toggle the visibility of force feedback radii in the editor viewport.
The value of this variable is set through the engine’s show flags system, which is typically controlled via the editor UI or programmatically. It’s defined using the SHOWFLAG_FIXED_IN_SHIPPING macro, indicating that it’s not available in shipping builds of the game.
The ForceFeedbackRadius variable interacts directly with this show flag. They share the same value and are used interchangeably in the codebase.
Developers should be aware that this show flag is only available in non-shipping builds. It’s categorized as an advanced show flag (SFG_Advanced), which means it might not be immediately visible in the default editor view settings.
Best practices when using this variable include:
- Use it primarily for debugging and visualization purposes during development.
- Remember that it won’t be available in shipping builds, so don’t rely on it for runtime gameplay features.
- Consider performance implications when enabling this show flag, as rendering additional debug information can impact frame rates.
Regarding the associated variable ForceFeedbackRadius:
The purpose of ForceFeedbackRadius is to represent the actual radius of force feedback effects in the game world. It’s used by the FForceFeedbackComponentVisualizer class to determine whether the visualizer should be enabled.
This variable is used within the ComponentVisualizers module, which is part of the Editor subsystem. It’s specifically tied to the visualization of UForceFeedbackComponent instances.
The value of ForceFeedbackRadius is typically set on UForceFeedbackComponent instances in the editor or through code.
It interacts directly with the ShowFlag.ForceFeedbackRadius, as the visualizer checks this show flag to determine if it should render the force feedback radius.
Developers should be aware that changes to ForceFeedbackRadius will only be visually reflected when ShowFlag.ForceFeedbackRadius is enabled.
Best practices for using ForceFeedbackRadius include:
- Set appropriate values that make sense for your game’s scale and force feedback design.
- Use it in conjunction with other force feedback properties for a comprehensive haptic experience.
- Remember to enable ShowFlag.ForceFeedbackRadius when you need to visualize or debug these radii in the editor.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:223
Scope: file
Source code excerpt:
SHOWFLAG_FIXED_IN_SHIPPING(0, AudioRadius, SFG_Advanced, NSLOCTEXT("UnrealEd", "AudioRadiusSF", "Audio Radius"))
/** Draw force feedback radii */
SHOWFLAG_FIXED_IN_SHIPPING(0, ForceFeedbackRadius, SFG_Advanced, NSLOCTEXT("UnrealEd", "ForceFeedbackSF", "Force Feedback Radius"))
/** Colors BSP based on model component association */
SHOWFLAG_FIXED_IN_SHIPPING(0, BSPSplit, SFG_Advanced, NSLOCTEXT("UnrealEd", "BSPSplitSF", "BSP Split"))
/** show editor (wireframe) brushes, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_FIXED_IN_SHIPPING(0, Brushes, SFG_Hidden, NSLOCTEXT("UnrealEd", "BrushesSF", "Brushes"))
/** Show the usual material light interaction */
SHOWFLAG_ALWAYS_ACCESSIBLE(Lighting, SFG_Hidden, NSLOCTEXT("UnrealEd", "LightingSF", "Lighting"))
#Associated Variable and Callsites
This variable is associated with another variable named ForceFeedbackRadius
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Editor/ComponentVisualizers/Public/ForceFeedbackComponentVisualizer.h:10
Scope (from outer to inner):
file
class class FForceFeedbackComponentVisualizer : public TAttenuatedComponentVisualizer<UForceFeedbackComponent>
function virtual bool IsVisualizerEnabled
Source code excerpt:
virtual bool IsVisualizerEnabled(const FEngineShowFlags& ShowFlags) const override
{
return ShowFlags.ForceFeedbackRadius;
}
};
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Public/ShowFlagsValues.inl:223
Scope: file
Source code excerpt:
SHOWFLAG_FIXED_IN_SHIPPING(0, AudioRadius, SFG_Advanced, NSLOCTEXT("UnrealEd", "AudioRadiusSF", "Audio Radius"))
/** Draw force feedback radii */
SHOWFLAG_FIXED_IN_SHIPPING(0, ForceFeedbackRadius, SFG_Advanced, NSLOCTEXT("UnrealEd", "ForceFeedbackSF", "Force Feedback Radius"))
/** Colors BSP based on model component association */
SHOWFLAG_FIXED_IN_SHIPPING(0, BSPSplit, SFG_Advanced, NSLOCTEXT("UnrealEd", "BSPSplitSF", "BSP Split"))
/** show editor (wireframe) brushes, for now SHOWFLAG_ALWAYS_ACCESSIBLE because it's exposed in SceneCapture */
SHOWFLAG_FIXED_IN_SHIPPING(0, Brushes, SFG_Hidden, NSLOCTEXT("UnrealEd", "BrushesSF", "Brushes"))
/** Show the usual material light interaction */
SHOWFLAG_ALWAYS_ACCESSIBLE(Lighting, SFG_Hidden, NSLOCTEXT("UnrealEd", "LightingSF", "Lighting"))