Skip to content

Drivers

Three SkeletonModifier3D scripts move bones on top of the animation. GoDNAHuman adds and configures all three itself, after every other modifier on the skeleton. Add your own as a child of the Skeleton3D only to run one at a different point among the modifiers; GoDNAHuman then configures yours instead of adding its own.

Twist

TwistModifier (twist_modifier.gd) spreads limb roll over the twist bones, so forearms, upper arms and legs don't pinch ("candy wrapper") when a hand, foot or whole limb rolls.

  • It finds twist bones by name: <Side><Limb>Twist01, ...02 (for example LeftLowerArmTwist01).
  • Each twist bone gets a share of the twist equal to its position along the limb at rest: 0 at the limb's start joint, 1 at its end. A bone a third of the way down the forearm turns a third as far as the hand.
  • Lower arm and lower leg twist bones follow the hand's or foot's roll about the limb.
  • Upper arm and upper leg twist bones undo the limb's own roll toward the shoulder or hip.
  • The twist axis is the limb's direction at rest, so it doesn't depend on the bones' local axes, which Godot's Rest Fixer changes for mapped bones but not for twist bones.

It replaces the twist bones' animation. Turn it off (GoDNAHuman.twist_enabled) for clips that already animate them, such as Unreal clips. strength scales every share; get_twist_bones() returns the driven bones with their shares.

Head driver

HeadDriver (head_driver.gd) turns the neck and head by GoDNAHuman.head_rotation, for example from face capture.

  • neck_share (0.4): the share of the turn the neck takes. The head takes the rest, so it always ends up turned by the full amount.
  • Directions are measured in the frame of the upper chest, not the bones' own axes: "left" points from the right eye to the left eye, "up" is the skeleton's +Y at rest.
  • source: any node with a head_rotation property; empty means the nearest GoDNAHuman above the skeleton.
  • neck_bone / head_bone default to Neck / Head.

Eye driver

ARKitEyeDriver (arkit_eye_driver.gd) turns the eyeballs from the eyeLook{In,Out,Up,Down}{Left,Right} weights. The blend shapes only move the eyelids; eyeball rotation is never baked into them.

  • max_horizontal (30°), max_up (25°), max_down (30°): the turn at weight 1.
  • Directions are measured in the head's frame, like the head driver.
  • source: any node with get_face_weight(name) -> float; empty means the nearest GoDNAHuman above the skeleton.
  • left_eye_bone / right_eye_bone default to LeftEye / RightEye.