← Back to Docs
  • index.html
  • Clayground
  • Clayground.Character3D
  • GestureAnim
  • Clayground 2026.7
  • GestureAnim QML Type

    Held poses - pointing, presenting, thumbs up, gesticulation and look-at - for one character. More...

    Import Statement: import Clayground.Character3D

    Properties

    Methods

    Detailed Description

    Every Character owns one of these and publishes it as verbs (Character::pointAt(), Character::presentAt(), Character::gesticulate(), Character::stopGesture(), ...), which is how it is normally used. Reach for the type itself only to drive a character built by hand.

    A gesture holds until it is released, so this layer and the activity cycles cannot both be running: it is confined to Character.Activity.Idle, and holding tells the rest of the character to keep off the joints while it is set.

    GestureAnim {
        id: gestures
        entity: someCharacter
    }
    
    gestures.request("point", stone.scenePosition, "auto")

    See also Character, IdleAnim, and DetailedHand.

    Property Documentation

    activeGesture : string [read-only]

    Which gesture is being held: "point", "present", "thumbsUp", "talk" or "".

    A head-only look reports "": it is direction, not a gesture.


    activeHand : string [read-only]

    Which arm is doing it: "left", "right", or "" while released or while talking, which is two-handed.


    beatScale : real

    Stretches or compresses the talking rhythm. 1 is as authored, above 1 is a slower speaker.


    entity : var

    The Character to drive. Null means the layer does nothing.


    gesture : string

    Which pose is wanted: "point" or "present" (both need target), "thumbsUp", "talk", or "" to release.

    "present" is the open hand offered toward a thing - palm up, at chest height, elbow bent - the "here we have" of a presenter. It is the gesture for a GROUP or an AREA: several parts, a whole circuit, anything where a finger at the centroid would point at nothing.


    hand : string

    Which arm gestures: "auto" (the one nearer the target), "left" or "right".


    holding : bool [read-only]

    True while this layer owns the joints - including the ease back to rest, which is not finished until it is false.

    Character gates IdleAnim and TalkGestureAnim on this. Nothing else may write a joint while it is true.


    leftHandPose : string [read-only]

    The DetailedHand pose for the left hand, or "".


    lookTarget : var

    Where the head looks, a scene-space vector3d, or null.

    Independent of gesture and outranks it: while it is set, the head aims here and the gesture keeps the arms. That is the difference between pointing at a thing and talking about it to someone else.


    rightHandPose : string [read-only]

    The DetailedHand pose for the right hand, or "" for "not mine to say" - then the character's own handPose applies.

    While talking this is per beat and per hand: two hands held in the same shape for the length of a sentence is most of what makes gesticulation read as a puppet. Ignored by characters whose hands are plain boxes; the wrist still turns either way.


    safeSilhouette : bool

    Whether a raised arm is forced to bend at the elbow.

    On by default. See the note in _apply(): this is a policy about what shape the character is allowed to make, not an accuracy measure. Turn it off for a character whose job is a salute, a hand-raise or a throw.


    settleMs : int

    How long a pose takes to arrive at - and to leave.


    settled : bool [read-only]

    True once the pose has arrived - the cue to start talking about the thing that was pointed at.


    target : var

    Where to point or present: a scene-space vector3d, or null for nowhere.


    Method Documentation

    void drop()

    Gives the joints up immediately, wherever they are.

    For the handover to an activity cycle: that cycle animates from whatever angle it finds, so easing back to rest first would be a second animator writing the same joints while it does. Releasing gracefully is request("") instead.


    void look(var where)

    Aims the head at a scene position; null lets it follow the gesture again.


    void request(string what, var where, string which)

    Asks for a gesture, in one step.

    Set as three properties instead and the pose is recomputed after each of them, from a half-changed request. This applies once.


    void turnTo(var where)

    Turns the whole body to face a scene position.

    The turn goes through the same body animation the poses use, because a second animator on the character's rotation would fight this one. It moves the RESTING orientation, so it survives the next release.