Skip to main content

ArmIKControllerHelper

A class in Root.Township, Alta.Character.

Editor setup helper for an arm's IK controllers: copies the bone and target transforms it is given into the solver, relaxers and controllers.

Constructors​

MemberWhat it is
ArmIKControllerHelper()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

18 private and internal fields
MemberWhat it is
private float angleLimitSwing limit in degrees for the wrist rotation limit.
private Vector3 axisAxis of the wrist rotation limit.
private Transform bodyBody transform given to the clavicle, elbow and shoulder controllers.
private Transform clavicleClavicle bone.
private TwistRelaxerSetting clavicleTwistRelaxerSettingsWeight and crossfade for the clavicle twist relaxer.
private Transform elbowElbow bone.
private Transform elbowTargetBend goal for the elbow.
private Transform handHand bone.
private HandIndex handIndexWhich hand this arm is.
private Transform handTargetIK target the hand reaches for.
private Transform handTargetWithCorrectedAxisOptional hand target with fixed axes for the elbow controller; falls back to handTarget.
private bool isAddingBonesToTwistRelaxerManagerAutomaticallyIf set, adds the elbow to the twist relaxer's bone list automatically.
private bool isFillingReferenceFromClavicleInspector-only field for the fill-from-clavicle button.
private bool isRefreshingManagersInspector-only field for the refresh managers button.
private Transform shoulderShoulder bone.
private ShoulderTwistControllerHelper shoulderTwistRelaxerControllerHelperHelper that sets up the shoulder twist limit.
private float twistLimitTwist limit in degrees for the wrist rotation limit.
private TwistRelaxerControllerHelper twistRelaxerControllerHelperHelper that sets up the forearm twist relaxers.

Properties​

MemberWhat it is
Transform Clavicle { set; }Sets the clavicle bone.
Transform Shoulder { get; }The shoulder bone.

Methods​

MemberWhat it is
void AttemptToFillTransformsFromClavicle()Fills shoulder, elbow and hand by walking first children down from the clavicle.
void ResetManagers()Pushes transforms, then sets up the twist relaxers and shoulder twist limit.
protected override void OnValidate()Editor: pushes the transforms to the controllers and runs the refresh or fill actions if their buttons were pressed.
1 private and internal method
MemberWhat it is
private void SetManagerTransforms()Assigns bones and targets to the limb IK, clavicle, elbow, twist and shoulder controllers, and sets the wrist rotation limit.