Skip to content

MotionBreathingComponent

MotionBreathingComponent adds subtle idle camera motion for the locally controlled character when it is not walking. Movement state starts and stops this camera motion.

Requirements

  • The character must have MotionCameraComponent.
  • Motion must find a UAbilitySystemComponent for walking-tag observation and the breathing active GameplayEffect.
  • You must initialize the Gameplay Ability System.
  • You must configure the GE_Motion_BreathingActive GameplayEffect.
  • You must configure the Motion.Camera.BreathingActive GameplayTag.

For setup steps, see How to add Motion to a character.

Behavior

The component observes Motion.State.Walking on the resolved ASC. Its walking-tag callback acts only for a locally controlled character. When walking stops, it tells the camera component to add or continue the breathing curve. It also applies the breathing active tag. MotionCameraComponent ignores this curve request while Motion.Camera.DisableShake is active.

Authority uses the configured GameplayEffect with a loose-tag fallback. A non-authority local client uses a loose tag. When walking starts, the component requests a curve pause and removes the tag. Breathing does not operate without a resolved ASC.

The active flag and GameplayTag of the component change immediately. The default breathing curve has bPauseAtNextZero = true. Thus, camera motion can continue until the next near-zero sample before it pauses.

Protected/Internal Behavior

The component owns walking-tag observation, camera-curve playback, GAS tag application, and debug printing internally. These hooks are protected implementation details, not public Blueprint API:

  • InitializeBreathingComponent() -> void
  • OnAbilitySystemComponentReady() -> void
  • OnWalkingTagChanged(const FGameplayTag Tag, int32 NewCount) -> void
  • StartBreathing() -> void: starts the breathing effect.
  • StopBreathing() -> void: stops the breathing effect.
  • IsCharacterWalking() -> bool: returns whether walking state is active.

Configuration

Configuration is in the assigned MotionBreathingProfile. The default Motion profile for this release is /MotionCore/Motion/Profiles/v2_0_0/DA_MotionBreathingProfile_Default_v2_0_0.

To change breathing behavior, duplicate the Motion-owned breathing profile into project content. Edit the duplicate. Then, assign it to the Profile property of the component. See Component profiles.

  • CameraBreathingCurve: FMotionCurve used for breathing camera motion. The curve can include subtle translation and rotation, playback rhythm, duration, and intensity.
  • BreathingActiveTagEffect: GameplayEffect that grants the breathing active tag.

The primary setting that you edit is the Profile reference. Active curve playback state, effect handles, and diagnostics stay on the component.

Runtime State

During play, the component stores BreathingCurveIdentifier, the active curve flag, and the breathing tag effect handle. It also stores the cached walking-tag delegate and diagnostics.

State Access

For the locally controlled pawn, read Motion.Camera.BreathingActive on its AbilitySystemComponent. This tag gives the active state to presentation logic. On a non-authority local client, this tag is local and loose. It is not an authoritative replicated state signal.

Motion - Advanced First Person Character Controller