Skip to content

MotionBreathingComponent

The Breathing Component adds subtle camera motion when the character is not walking. It auto-activates based on movement state.

Requirements

  • Character with MotionCameraComponent attached
  • MotionPlayerState configured in GameMode
  • Gameplay Ability System (GAS) initialized
  • Gameplay Effects:
    • GE_Motion_BreathingActive - Grants breathing active tag
  • Gameplay Tags:
    • Motion.Camera.BreathingActive - Active when breathing effect is applied

Installation

  1. Add UMotionBreathingComponent to your Character Blueprint or C++ class
  2. Ensure MotionCameraComponent is also added to the character
  3. Configure the CameraBreathingCurve with your desired breathing pattern:
    • Set Translation curves for subtle head movement
    • Configure Rotation curves for natural head tilt
    • Adjust PlayRate for breathing rhythm
  4. Set the BreathingActiveTagEffect to GE_Motion_BreathingActive
  5. The component will automatically activate when the character is idle

Functionality

Breathing State Machine

Expandability

The MotionBreathingComponent provides virtual functions for customization:

Blueprint Events

EventDescription
OnBreathingStarted()Called when breathing starts. Override to add sounds/effects.
OnBreathingStopped()Called when breathing stops. Override to clean up effects.

Core Functions

FunctionParametersReturnsUse Case Examples
IsBreathingActive()Nonebool• Query state
• UI indicators

State Management Functions

FunctionParametersReturnsUse Case Examples
UpdateBreathingState()Nonevoid• State logic
• Condition checks
StartBreathing()Nonevoid• Begin effect
• Sound trigger
StopBreathing()Nonevoid• End effect
• Clean up
InitializeBreathingComponent()Nonevoid• Setup refs
• Validation

Utility Functions

FunctionParametersReturnsUse Case Examples
IsCharacterWalking()Nonebool• Movement check
• State detection
GenerateCurveIdentifier()NoneFName• Unique IDs
• Multi-component
PrintDebugInformation()Nonevoid• Debug display
• State logging

Configuration

Breathing Settings

PropertyTypeDescription
CameraBreathingCurveFMotionCurveThe breathing shake curve applied to camera:
• Translation curves for subtle head bob (X, Y, Z)
• Rotation curves for natural head tilt (Pitch, Yaw, Roll)
• PlayRate for breathing rhythm speed
• Duration for complete breath cycle
• Multiplier for effect intensity

GAS Integration

PropertyTypeDescription
BreathingActiveTagEffectTSubclassOf<UGameplayEffect>Grants breathing active tag

Read-Only State Properties

PropertyTypeDescription
BreathingCurveIdentifierFNameUnique identifier for breathing curve
bHasActiveCurveboolWhether breathing curve is currently active

Debug Configuration

PropertyTypeDefaultDescription
bShowDebugInformationboolfalseDebug information display

State Access

Query breathing state for gameplay logic:

  • IsBreathingActive() - Check if breathing effect is currently active

Automatic Activation

The component automatically manages breathing state:

  • Instant activation when character becomes idle
  • Immediate deactivation when movement starts
  • No delay or transition time for responsive feel
  • Frame-perfect detection of movement state changes

Motion - Advanced First Person Character Controller