ArmRig

A simple Rig subclass for Unity's Animation Rigging package that exposes a Target transform for arm IK. Runs in both play mode and edit mode.

Definition

Namespace: Paragon.Townskeep.CharacterSystem Assembly: Townskeep.dll

[ExecuteAlways]
public class ArmRig : Rig

Inheritance: MonoBehaviourRigBuilderRigArmRig

Remarks

ArmRig extends Unity's Rig class (from the Animation Rigging package) to add a public Target transform reference. This target is typically used by child rig constraints (e.g., TwoBoneIKConstraint, MultiAimConstraint) to drive arm IK.

The [ExecuteAlways] attribute ensures the rig updates in the editor, allowing animators to preview IK results without entering play mode.

Usage Pattern

  1. Add ArmRig as a child of a RigBuilder in the character hierarchy

  2. Add IK constraints (e.g., TwoBoneIKConstraint) as children of the ArmRig

  3. Set the Target transform to the IK target (e.g., a held item's grip point)

  4. Child constraints reference ArmRig.Target as their IK target

Quick Lookup

Goal
How

Set IK target

Assign ArmRig.Target to a Transform

Enable/disable arm IK

Set ArmRig.weight (inherited from Rig)

Preview in editor

Enabled by default ([ExecuteAlways])

Fields

Target

The transform that child IK constraints should use as their target position/rotation.

See Also

Last updated