logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AimDistributionSolver

    Pure pitch/yaw distribution math for target-aware aim: clamps normalized pitch/yaw inputs to [-1, 1] and distributes them across a fixed set of bones (chest/neck/head/upper-arms) by per-bone share, scaled by each axis' max-degrees tuning. No engine references — uses only Math — so the distribution is unit-testable without a scene or engine.

    Inheritance
    object
    AimDistributionSolver
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.ProceduralAnimator.Domain.Services
    Assembly: Serenity.ProceduralAnimator.Domain.dll
    Syntax
    public static class AimDistributionSolver

    Methods

    Solve(double, double, double, double, double, double, double, double, double, double, double, double)

    Distributes clamped pitch/yaw across the chest/neck/head/upper-arm bone shares.

    Declaration
    public static AimPose Solve(double pitchNormalized, double yawNormalized, double maxPitchDegrees, double maxYawDegrees, double chestPitchShare, double chestYawShare, double neckPitchShare, double neckYawShare, double headPitchShare, double headYawShare, double upperArmPitchShare, double upperArmYawShare)
    Parameters
    Type Name Description
    double pitchNormalized

    Normalized pitch input, expected in [-1, 1] (clamped defensively).

    double yawNormalized

    Normalized yaw input, expected in [-1, 1] (clamped defensively).

    double maxPitchDegrees

    Pitch scale — degrees at |pitchNormalized| == 1.

    double maxYawDegrees

    Yaw scale — degrees at |yawNormalized| == 1.

    double chestPitchShare

    Chest's share of maxPitchDegrees.

    double chestYawShare

    Chest's share of maxYawDegrees.

    double neckPitchShare

    Neck's share of maxPitchDegrees.

    double neckYawShare

    Neck's share of maxYawDegrees.

    double headPitchShare

    Head's share of maxPitchDegrees.

    double headYawShare

    Head's share of maxYawDegrees.

    double upperArmPitchShare

    Same-value share applied to both upper arms' pitch.

    double upperArmYawShare

    Same-value share applied to both upper arms' yaw.

    Returns
    Type Description
    AimPose

    The resolved AimPose — one pitch/yaw degree pair per bone role.

    In this article
    © 2026 Serenity. All Rights Reserved