logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class CommunicationGestureActionSO

    Generic communication-gesture action: blends up to eight bone slots (both arms, head and chest) into an authored held pose over a windup, holds that pose — optionally oscillating each slot with a sine wave, which is what turns a raised arm into a wave, a beckon, a fist pump or a tremble — then blends back to neutral over a recovery.

    Inheritance
    object
    ProceduralActionSO
    CommunicationGestureActionSO
    Implements
    IProceduralAction<UnityProceduralContext>
    IFoundationSettings
    Inherited Members
    ProceduralActionSO.Id
    ProceduralActionSO.Guid
    ProceduralActionSO.displayName
    ProceduralActionSO.cooldownSeconds
    ProceduralActionSO.minDurationSeconds
    ProceduralActionSO.priority
    ProceduralActionSO.CanStart(in UnityProceduralContext)
    ProceduralActionSO.OnStop(in UnityProceduralContext, ActionRuntimeState)
    ProceduralActionSO.DisplayName
    ProceduralActionSO.CooldownSeconds
    ProceduralActionSO.MinDurationSeconds
    ProceduralActionSO.Priority
    Namespace: Serenity.ProceduralAnimator.Infrastructure.ProceduralActions
    Assembly: Serenity.UnityProceduralAnimator.Infrastructure.dll
    Syntax
    public class CommunicationGestureActionSO : ProceduralActionSO, IProceduralAction<UnityProceduralContext>, IFoundationSettings
    Remarks

    This type carries NO gesture identity of its own. It is a shape — "hold a pose, wobble it, let go" — and every actual gesture (point-and-beckon, taunt, surprise, alert wave, advance signal, hold signal, cheer, cower) lives entirely in an asset INSTANCE of this type: the per-slot target Eulers and oscillation amplitudes ARE the gesture. Adding a new gesture is an authoring act (create asset, create rule), never a code change. Do not subclass this per gesture, and do not add a gesture enum here — the game-side domain owns that vocabulary and maps it to assets through RuleSO conditions on a state key.

    Combines the two patterns its siblings established: the multi-bone pose blend of MeleeStrikeActionSO (per-bone Vector3.Lerp toward an authored Euler) and the internal sine oscillation of DeathFallActionSO (Mathf.Sin(elapsed * frequency * 2*PI)). Like every action it composes ADDITIVELY on top of whatever pose layers are already contributing this frame, so a gesture authored for a standing enemy still reads when it plays over a crouched, prone or aiming pose — the layers supply the stance, this action supplies the deviation.

    There is no animator-level blend for actions: the intensity envelope built here IS the gesture's blend curve, which is why both the windup and the recovery are authored on the asset rather than left to the rule. The inherited cooldownSeconds throttles how often the same gesture may restart; the inherited priority is unused by the pipeline.

    Constructors

    CommunicationGestureActionSO()

    Declaration
    public CommunicationGestureActionSO()

    Methods

    IsFinished(in UnityProceduralContext, ActionRuntimeState)

    Checks if this action has finished.

    Declaration
    public override bool IsFinished(in UnityProceduralContext ctx, ActionRuntimeState runtime)
    Parameters
    Type Name Description
    UnityProceduralContext ctx

    The procedural context.

    ActionRuntimeState runtime

    Runtime state for this action instance.

    Returns
    Type Description
    bool

    True if the action should stop.

    Overrides
    ProceduralActionSO.IsFinished(in UnityProceduralContext, ActionRuntimeState)

    OnStart(in UnityProceduralContext, ActionRuntimeState)

    Draws this activation's scalar pose multiplier into CustomData, mirroring StunRecoilActionSO's per-activation variation. A single scalar (rather than a per-axis vector) is deliberate: scaling a gesture's authored Euler uniformly keeps its direction — the whole point of a readable signal — while still varying how emphatically each enemy performs it.

    Declaration
    public override void OnStart(in UnityProceduralContext ctx, ActionRuntimeState runtime)
    Parameters
    Type Name Description
    UnityProceduralContext ctx
    ActionRuntimeState runtime
    Overrides
    ProceduralActionSO.OnStart(in UnityProceduralContext, ActionRuntimeState)

    Tick(in UnityProceduralContext, ActionRuntimeState, ref PoseDelta)

    Called every frame while the action is active. Adds the action's contribution to the pose delta.

    Declaration
    public override void Tick(in UnityProceduralContext ctx, ActionRuntimeState runtime, ref PoseDelta pose)
    Parameters
    Type Name Description
    UnityProceduralContext ctx

    The procedural context.

    ActionRuntimeState runtime

    Runtime state for this action instance.

    PoseDelta pose

    The pose delta to add contributions to.

    Overrides
    ProceduralActionSO.Tick(in UnityProceduralContext, ActionRuntimeState, ref PoseDelta)

    Implements

    IProceduralAction<TContext>
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved