← Back to Docs
  • index.html
  • Clayground
  • Clayground.Character3D
  • Leg
  • Clayground 2025.2
  • Leg QML Type

    A complete leg with upper leg, lower leg, and foot. More...

    Import Statement: import Clayground.Character3D
    Inherits:

    BodyPartsGroup

    Properties

    Detailed Description

    Leg is a hierarchical body part group containing an upper leg, lower leg, and foot connected by animatable joints (hip, knee, ankle).

    The leg uses a joint-based hierarchy for natural animation: - Hip joint controls the entire leg - Knee joint controls lower leg and foot - Ankle joint controls foot rotation

    Example usage:

    import Clayground.Character3D
    
    Leg {
        width: 1.2
        height: 5.5
        upperRatio: 0.5
        color: "#708090"
        footColor: "#8b4513"
    }

    See also Arm, Foot, and Character.

    Property Documentation

    color : color

    Color of the leg (upper and lower segments).


    foot : Node [read-only]

    Reference to the ankle joint for animation.


    footColor : color

    Color of the foot (shoe color).


    footDepth : real

    Depth of the foot.


    footHeight : real

    Height of the foot.


    footWidth : real

    Width of the foot.


    lowerLeg : Node [read-only]

    Reference to the knee joint for animation.


    lowerTaper : real

    Taper factor for lower leg width/depth (0-1).

    Controls how much the calf narrows compared to the thigh.


    upperLeg : Node [read-only]

    Reference to the hip joint for animation.


    upperRatio : real

    Proportion of total leg length for upper leg (0.4-0.6).

    A value of 0.5 means upper and lower leg are equal length.