Creature Kit v1.1 Procedural Creature Creation for Unity
Search Results for

    Show / Hide Table of Contents
    Documentation
    Home Animation Channels Guide Clips Guide No-Code Guide API Reference

    Class SerpentineLocomotionMath

    Controller-neutral helpers that convert an observed world displacement into wave phase.

    Inheritance
    object
    SerpentineLocomotionMath
    Namespace: CreatureKit.Serpentine
    Assembly: CreatureKit.Serpentine.Runtime.dll
    Syntax
    public static class SerpentineLocomotionMath

    Methods

    AdvancePhase(float, float, float)

    Advances a normalized phase by an actual signed travel distance.

    Declaration
    public static float AdvancePhase(float currentPhase, float signedTravelDistance, float distancePerCycle)
    Parameters
    Type Name Description
    float currentPhase
    float signedTravelDistance
    float distancePerCycle
    Returns
    Type Description
    float

    CalculateSignedPathDistance(Vector3, Vector3)

    Returns the actual path distance, signed from its alignment with the creature's forward axis. Lateral-only displacement does not advance the locomotion wave.

    Declaration
    public static float CalculateSignedPathDistance(Vector3 actualWorldDisplacement, Vector3 worldForward)
    Parameters
    Type Name Description
    Vector3 actualWorldDisplacement
    Vector3 worldForward
    Returns
    Type Description
    float
    Back to top Generated by DocFX