Skip to main content

Console Commands / Variables

A reference of the console variables (CVars) provided by KawaiiPhysics, plus the stat commands useful for debugging. All CVars share the a.AnimNode.KawaiiPhysics. prefix and are used to tune runtime behavior or toggle debug visualization.

note

Everything on this page is a console variable (a value you read or write). The only function-style "console command" is p.KawaiiPhysics.DumpNodes, added in v1.22.0, which logs the main settings of running nodes (not available in Shipping builds). For profiling, use UE's standard stat commands.

Usage​

Console variables can be set in any of the following ways.

# Editor / in-game console (open with @ or ~)
a.AnimNode.KawaiiPhysics.Debug 1

# Check the current value (omit the value to print the current value and help)
a.AnimNode.KawaiiPhysics.Debug

To fix a value at startup, add it to DefaultEngine.ini.

[ConsoleVariables]
a.AnimNode.KawaiiPhysics.SharedCollision.ReadMaxAge=15

You can also pass it from the command line.

YourGame.exe -ExecCmds="a.AnimNode.KawaiiPhysics.Debug 1"

Debug CVars​

Build configuration

The three CVars below are only registered in builds where ENABLE_ANIM_DEBUG is on (Editor / Development / DebugGame). They do not exist in Shipping / Test builds.

CVarTypeDefaultDescription
a.AnimNode.KawaiiPhysics.EnablebooltrueEnable / disable KawaiiPhysics. Set to 0 to stop simulation on all KawaiiPhysics nodes
a.AnimNode.KawaiiPhysics.DebugboolfalseEnable visual debug drawing for bone chains, external forces, and more
a.AnimNode.KawaiiPhysics.DebugDrawThicknessfloat1.0Debug draw line thickness. Values <= 0 draw the thinnest lines
# Pause the simulation to compare against the source animation
a.AnimNode.KawaiiPhysics.Enable 0

# Enable debug drawing and thicken the lines for readability
a.AnimNode.KawaiiPhysics.Debug 1
a.AnimNode.KawaiiPhysics.DebugDrawThickness 2.0
tip

Debug drawing can be filtered by GameplayTag. See Debugging for details.

Initialization CVars​

CVarTypeDefaultDescription
a.AnimNode.KawaiiPhysics.UseBoneContainerRefSkeletonWhenInitbooltrueSelects which RefSkeleton InitModifyBones reads from. true uses the BoneContainer's RefSkeleton (fix for Issue #174). Set to false to revert to the previous behavior

External Force Compatibility CVars​

CVarTypeDefaultDescription
a.AnimNode.KawaiiPhysics.Gravity.LegacyCharacterGravityScaleSignboolfalseAdded in v1.22.0. 1 restores the behavior of v1.21 and earlier, where bUseCharacterGravityScale of the Gravity external force pushed upward. A temporary migration setting that will be removed in a future version

Shared Collision CVars​

These tune the freshness management and cleanup behavior of the Shared Collision shared data. The prefix is a.AnimNode.KawaiiPhysics.SharedCollision..

CVarTypeDefaultDescription
a.AnimNode.KawaiiPhysics.SharedCollision.ReadMaxAgeint3210Max frame age for the ReadMerged freshness check. Published data older than this is ignored. Set it high enough to account for URO / LOD skips
a.AnimNode.KawaiiPhysics.SharedCollision.CleanupMaxAgeint3260Grace period in frames before expired slots are removed during Tick cleanup
a.AnimNode.KawaiiPhysics.SharedCollision.InitRetryThresholdint3260Number of Target init retries before a warning is logged
a.AnimNode.KawaiiPhysics.SharedCollision.InitRetryThrottleIntervalint3260Retry interval (frames) after the count above is reached. Avoids retrying every frame with a misconfigured tag
a.AnimNode.KawaiiPhysics.SharedCollision.CleanupIntervalfloat1.0Interval in seconds at which cleanup runs
tip

When evaluation is throttled by URO (Update Rate Optimization) or LOD, the Source publishes less frequently. If you want to keep using the most recent data while throttled, raise ReadMaxAge.

Stat Commands​

Use UE's standard stat commands to profile KawaiiPhysics.

# Display animation stats
stat Anim

KawaiiPhysics stats are registered under STATGROUP_Anim, not in a separate group. Run stat Anim and look for entries that start with KawaiiPhysics_. For detailed performance investigation, see Performance Optimization.

Source Code​

The CVars are defined in the following files.