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

    Create Your First Serpentine

    In Unity, choose:

    Tools > Creature Kit > Serpentine > Create Serpentine
    

    The command creates a Serpentine GameObject under CreatureKitRoot and adds Structure, Surface and Locomotion. Select each component to shape the Body and its Heads, choose their surface and tune the gait.

    For a playable example, open:

    Assets/CreatureKit/Serpentine/Demos/SerpentineV1Demo.unity
    

    Enter Play Mode and use the arrow keys or WASD. Left/right changes the central direction chosen by the guiding Head. Forward movement advances its automatic left/right steering, writes the achieved trajectory and Body follows behind. The movement controller in that scene is delivered as readable demo source. It is not part of the product movement API.

    Hold the right mouse button and drag horizontally or vertically to orbit around and above the Serpentine. Use the mouse wheel to zoom.

    Keep Play Mode tuning

    Tune SerpentineLocomotion while the creature is moving. When the settings look right, click Keep Settings After Play in the Locomotion inspector, then stop Play Mode. Creature Kit restores the captured serialized settings automatically and marks the scene as modified. Save the scene normally to keep them on disk.

    Only the component settings are copied. The generated pose, terrain samples and accumulated travel remain runtime state and are not preserved.

    Replace the demo controller

    Leave SerpentineStructure, SerpentineSurface and SerpentineLocomotion on the visual root. Move that root as the collision-authoritative Head guide with your own controller. Locomotion observes the achieved Transform path and reconstructs Body behind it without rotating the whole creature around its center.

    For precise collision-resolved integration, report the achieved displacement after your controller moves:

    Vector3 targetDirection = ComputeChosenWorldDirection();
    locomotion.SetGuidanceWorldDirection(targetDirection);
    Vector3 travelDirection = locomotion.GuidanceWorldDirection;
    
    Vector3 requestedTravel = travelDirection * speed * Time.deltaTime;
    Vector3 safeTravel = locomotion.ResolveGuidanceDisplacement(requestedTravel);
    Vector3 beforeMove = transform.position;
    characterController.Move(safeTravel + gravityDisplacement);
    locomotion.ReportActualDisplacement(
        transform.position - beforeMove,
        travelDirection);
    

    SetGuidanceWorldDirection sets a target central heading. GuidanceCenterWorldDirection is that heading after Maximum Turn Speed; GuidanceWorldDirection also includes automatic Head yaw and is the direction to use for travel. Steering Amplitude sets its angle. Its spatial phase uses Steering Cycles and advances only from achieved signed travel, so waiting does not animate the creature in place.

    The safe-displacement query uses the complete current Head volume, including the open Lower Jaw. It can slide travel up a slope. Optional Self Contact lets the guide begin climbing over the current Body; without it, Head/Body crossings remain unconstrained. It does not move the Transform or replace the controller's final collision resolution.

    Open the Self Contact foldout to enable Body/Body constraints. Start with Medium for one hero creature or Low for many creatures. The diagnostic toggles draw orange/violet Head capsules, cyan terrain-guard capsules, blue Body-contact capsules and red/yellow active constraints in the Scene view.

    Guiding Head selects the only Head driven by Locomotion. Other Heads remain available for a future animation component. Call ResetMotionTracking() after teleporting the observed Transform.

    Back to top Generated by DocFX