Skip to content

Hand Contacts.en

Claude Code edited this page Nov 20, 2026 · 2 revisions

Hand Contacts

中文 · English

AssimpLoader provides a constrained analytic two-bone solver. RigWorks selects one item contact per client tick, reads the primary hand's item display frame from the incoming pose, and solves the opposite arm. No JavaScript runs inside the solver, and the primary arm is not dragged to an unreachable contact.

Enabling

Contacts start disabled. Turn on Contacts in LookDev's Player page, set character.handContacts in rigworks-client.toml, or use the client command:

/assimploader character contacts on|off

This is independent of the motion mode and RigPhysics. /assimploader character shows the last contact error and whether reach or bend limits clamped the target.

Grip rules

The profile's equipmentDefinition names the JSON resource. Existing files without grips keep their original behaviour. A grip can be selected by item IDs, item tags, physical primary arm and state:

{
  "version": 1,
  "right_hand": {"node": "Hand.R"},
  "left_hand": {"node": "Hand.L"},
  "grips": [{
    "id": "rifle_support",
    "tags": ["my_pack:two_handed"],
    "states": ["held"],
    "primary_arm": "right",
    "socket": [0.15, -0.1, 0.05],
    "pole": [0.25, -0.5, -0.15],
    "min_bend": 2,
    "max_bend": 160,
    "weight": 1,
    "free_support": true
  }]
}

Use your model's actual mount offsets and quaternion. Rules are evaluated in file order and the first match wins. using, charged and held are mutually exclusive; put charging rules before charged-holding rules. primary_arm defaults to any, or left/right; Minecraft's main/off-hand setting is resolved to this physical arm. free_support can require the other inventory hand to be empty. At most 32 rules are accepted.

  • socket is a wrist contact point in the centred item model frame after the resolved third-person camera transform. Item model coordinates in [0,1] need their centre (0.5,0.5,0.5) subtracted, matching ItemRenderer's centring step. It is not a world-space position.
  • pole is a shoulder-relative vector in the rig's bind model axes. It follows the torso's current rotation, and its X component is mirrored for a right support arm. It controls the elbow plane without assuming the imported bone's local axis.
  • Bend limits are degrees, where zero is a straight arm and 180 is excluded. Unreachable targets clamp to the permitted segment length and bend range.

For an oriented palm/finger contact, add rotation (quaternion), orientation_weight and hand_offset (metres in the hand's oriented frame). A nonzero hand_offset requires full orientation weight so the target cannot depend on an unknown partially blended hand orientation. With partial overall weight the output blends back toward the incoming pose, so exact contact and full-weight bend limits are not promised.

Script policy

RigWorks.register('my_pack:contacts', function (frame) {
  frame.defaultAnimation()
  // JSON normally selects automatically. A script may select a rule explicitly.
  // frame.contact('rifle_support', true) // true: item is in the main hand
  frame.contactWeight(0.8)
})
  • contacts() enumerates rule IDs.
  • contact(id, mainHand) selects a rule without its automatic item/state filters.
  • contactWeight(0..1) changes its influence for this tick.
  • noContact() cancels contact for this tick.
  • contactStatus() reports the previous completed solve, not a speculative result during the callback.

Overrides reset every tick; a failed controller restores automatic selection before the native fallback. The global switch and ragdoll state remain authoritative.

Evaluation order and scope

Contact IK runs after motion, clip/pose overlays and ground alignment, and before rigid-body feedback. Physics may subsequently move a dynamic hand; contacts are disabled while ragdoll is active. Equipment and fishing-line consumers keep reading the same completed visual snapshot. Server collision, combat and inventory are unchanged.

The block-player rules are optional wrist-target demonstrations calibrated for that fixture's poses and vanilla item display transforms. They do not infer or guarantee palm contact with a weapon mesh. A resource pack that changes that mesh, the display transforms or bone proportions must author its own grip data. Baked animation does not recover FBX IK and physics authoring graphs automatically.

Evaluation samples completed tick poses; it does not establish exact contact between interpolated ticks, after physics feedback, or against arbitrary weapon geometry.

Clone this wiki locally