Appearance
Visual Logger & Rewind Debugger
Motion integrates with Unreal Engine's Visual Logger to provide rich debugging visualization of movement state, component status, and GAS (Gameplay Ability System) data. This guide covers how to use these debugging tools with Motion.
What is Visual Logger?
Visual Logger is Unreal Engine's built-in tool for recording and visualizing runtime data. It captures:
- Text logs - Timestamped messages with categories
- 3D shapes - Arrows, spheres, capsules drawn in the world
- Histograms - Values plotted over time
- Snapshots - State captured at specific moments
Combined with the Rewind Debugger, you can scrub through recorded data to analyze exactly what happened during gameplay.
Visual Logger excels at debugging movement issues, GAS state problems, timing issues, and multiplayer desync.
Enabling Visual Logger
Console Command
VisLogThis toggles the Visual Logger window.
Menu Access
Window > Developer Tools > Visual Logger
Recording
- Open Visual Logger
- Click the Record button (red circle)
- Play the game
- Stop recording when done
- Scrub through the timeline to analyze
Automatic Logging
Motion's UMotionSubsystem automatically logs comprehensive state data every tick. No configuration required for basic usage.
What Gets Logged
| Category | Data | Verbosity |
|---|---|---|
| Movement | Velocity, Speed, Movement Mode, Grounded state | Log |
| Components | Active/Inactive state of all Motion components | Verbose |
| GAS Tags | All owned gameplay tags | Log |
| GAS Attributes | Values from configured whitelist | Log |
| GAS Effects | Count of active gameplay effects | Verbose |
| 3D Shapes | Velocity arrow, Character capsule | Log/Verbose |
Filtering by Category
In Visual Logger, filter by LogMotionVisual to see only Motion-related entries. This dedicated category keeps Motion logs separate from engine noise.
State-Based Colors
3D debug shapes use colors to indicate movement state at a glance:
| State | Color | When |
|---|---|---|
| Walking/Idle | Green | Default grounded movement |
| Sprinting | Blue | Sprint component active and moving fast |
| Crouching | Yellow | Character is crouched |
| Falling/Jumping | Red | Character is airborne |
The velocity arrow and capsule outline both reflect the current state color.
Configuring Tracked Attributes
By default, Motion logs general movement state. To track specific GAS attributes (like Stamina), configure the whitelist:
In C++
cpp
// Get the subsystem
UMotionSubsystem* Subsystem = GetLocalPlayer()->GetSubsystem<UMotionSubsystem>();
// Add attributes to track
Subsystem->TrackedAttributes.Add(UMotionAttributeSet::GetStaminaAttribute());
Subsystem->TrackedAttributes.Add(UMotionAttributeSet::GetWalkSpeedAttribute());In Blueprint
- Get the Motion Subsystem from your Local Player
- Access the
Tracked Attributesarray - Add the
FGameplayAttributeentries you want to monitor
Tracked attributes automatically generate histograms in Visual Logger, showing value changes over time.
Blueprint Logging Functions
Motion exposes typed logging functions for custom Blueprint debugging:
| Function | Parameters | Use Case |
|---|---|---|
LogVector | Key, FVector | Position, velocity, direction |
LogRotator | Key, FRotator | Rotation, aim direction |
LogFloat | Key, float | Speed, stamina, cooldowns |
LogGameplayTag | Key, FGameplayTag | Single tag state |
LogGameplayTagContainer | Key, FGameplayTagContainer | Multiple tags |
LogAttribute | FGameplayAttribute | GAS attribute value |
LogText | Category, Message | Custom text messages |
Example Usage
cpp
// Log custom data from your Blueprint or C++
UMotionSubsystem* Subsystem = GetLocalPlayer()->GetSubsystem<UMotionSubsystem>();
Subsystem->LogFloat(FName("CustomSpeed"), MyCustomSpeed);
Subsystem->LogText(FName("AI"), TEXT("Started chase behavior"));All custom logs appear with [BP] prefix in Visual Logger for easy identification.
Histograms
Visual Logger displays histograms for:
- Speed - Character velocity magnitude over time (under "Motion" graph)
- Tracked Attributes - Each configured attribute gets its own histogram (under "Attributes" graph)
Viewing Histograms
- In Visual Logger, select your character actor
- Look for the histogram graphs in the bottom panel
- Hover over data points to see exact values and timestamps
Histograms are invaluable for spotting:
- Sudden speed changes (sprint activation/deactivation)
- Stamina drain rates
- Unexpected value spikes or drops
Rewind Debugger
Motion provides a debug description for the Rewind Debugger timeline:
Motion: Speed=450 Mode=MOVE_Walking Components=5This summary appears in the Rewind Debugger actor list, showing:
- Current movement speed
- Movement mode (Walking, Falling, etc.)
- Number of registered Motion components
Using Rewind Debugger
- Enable Rewind Debugger: Edit > Editor Preferences > Rewind Debugger > Enable
- Record gameplay with Visual Logger
- Open the Rewind Debugger panel
- Scrub through the timeline
- Motion state updates in real-time as you scrub
Network Filtering
In multiplayer, Motion intelligently filters logging to prevent duplicate entries:
| Network Role | Logs? | Reason |
|---|---|---|
| Authority (Server) | Yes | Authoritative state |
| Autonomous Proxy (Owning Client) | Yes | Local player state |
| Simulated Proxy (Other Clients) | No | Would duplicate server logs |
Splitscreen Support
Each local player has their own UMotionSubsystem instance, so splitscreen scenarios log correctly for each player without interference.
Performance Notes
Visual Logger is automatically disabled in Shipping builds. The ENABLE_VISUAL_LOG macro is set to 0, and all logging code compiles to empty functions.
Build Configuration Behavior
| Build | ENABLE_VISUAL_LOG | Overhead |
|---|---|---|
| Editor | 1 (enabled) | Normal logging overhead |
| Development | 1 (enabled) | Normal logging overhead |
| Shipping | 0 (disabled) | Zero overhead |
The logging functions still exist in Shipping builds (for API compatibility) but do nothing, ensuring no runtime cost in your packaged game.
Console Commands Reference
| Command | Description |
|---|---|
VisLog | Toggle Visual Logger window |
log LogMotionVisual Log | Set Motion VLOG verbosity to Log |
log LogMotionVisual Verbose | Set Motion VLOG verbosity to Verbose |
Troubleshooting
No Motion Logs Appearing
- Verify
UMotionSubsystemis active (check your game mode uses Motion) - Ensure you're not in a Shipping build
- Check the Visual Logger category filter includes
LogMotionVisual
Logs Only on Server, Not Client
This is expected behavior. SimulatedProxy characters don't generate logs to prevent duplicates. If you need client-side debugging, play as the owning client (Autonomous Proxy).
Histograms Not Showing
- Ensure Visual Logger is recording (red dot should be filled)
- Select your character actor in the Visual Logger actor list
- Scroll down in the details panel to find histogram graphs