Class AimDirectionLayerSO
Stateless procedural layer that drives target-aware aim: reads signed, normalized pitch/yaw
state keys and writes per-bone chest/neck/head/upper-arm rotation offsets via the pure
AimDistributionSolver. The yaw lead on the head/chest (snapping toward the
target while the whole body's yaw catches up via EnemyBehaviorController.ApplyFacing)
is the highest-impact visual change this layer contributes.
Mechanism: every bone offset is a deterministic function of the current pitch/yaw state — no per-instance runtime state on this shared asset. Pitch/yaw are written by the controller each frame from the chest bone's world position, so this layer never touches world space itself.
Inherited Members
Namespace: Serenity.ProceduralAnimator.Infrastructure.ProceduralLayers
Assembly: Serenity.UnityProceduralAnimator.Infrastructure.dll
Syntax
public class AimDirectionLayerSO : ProceduralLayerSO, IProceduralLayer<UnityProceduralContext>, IFoundationSettings
Constructors
AimDirectionLayerSO()
Declaration
public AimDirectionLayerSO()
Properties
DrivenChannels
Writes only Pose — the only Evaluate overload this layer overrides.
Declaration
public override ProceduralChannels DrivenChannels { get; }
Property Value
| Type | Description |
|---|---|
| ProceduralChannels |
Overrides
Methods
Evaluate(in UnityProceduralContext, float, ref PoseDelta)
Evaluates this layer and adds its contribution to the pose delta. Called every frame for all active layers.
Declaration
public override void Evaluate(in UnityProceduralContext ctx, float weight, ref PoseDelta pose)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityProceduralContext | ctx | The procedural context containing state and time information. |
| float | weight | The weight of this layer (0-1). Used for blending. |
| PoseDelta | pose | The pose delta to add contributions to. |