Skip to main content

B1AnimNotifyState_PlaySwimEffect

File: BlueClient2/Source/BlueClient/Animation/AnimNotifies/B1AnimNotifyState_PlaySwimEffect.h / .cpp Base Class: UAnimNotifyState_TimedNiagaraEffect (Niagara plugin)

Purpose

Plays a Niagara swim effect (water splash / ripple) while the character is swimming. Automatically stops if the character exits the water mid-animation. Selects different effect templates for ocean vs. fresh water.

How to Add in the Editor

  1. Open an Animation Montage or Animation Sequence.
  2. Right-click on the Notify trackAdd Notify StateB1AnimNotifyState_PlaySwimEffect.
  3. Assign Template (fresh water) and TemplateOcean, set the socket and duration.

Editor Properties

PropertyTypeDefaultDescription
TemplateUNiagaraSystem*Niagara effect for fresh water (inherited from base class)
TemplateOceanUNiagaraSystem*Niagara effect for ocean water
SocketNameFNameSocket to attach the effect to (inherited)
LocationOffsetFVector(0,0,0)Position offset (inherited)
RotationOffsetFRotator(0,0,0)Rotation offset (inherited)
bDestroyAtEndboolDestroy the Niagara component when the notify ends (inherited)

Behavior

CallbackAction
SpawnEffect (Begin)Checks UB1TerritoryManager::IsInWaterTerritory() to select between Template and TemplateOcean, then spawns and attaches the Niagara system
NotifyTickChecks character->GetPostureType() == EB1PostureType::Swim; stops the effect early if the character is no longer swimming
NotifyEndStops and destroys the Niagara component