Skip to main content

NeckIKControllerHelper

A class in Root.Township, Alta.Character.

Editor helper for NeckIKController that fills in three neck bones from a root bone and builds the FABRIK chain with rotation limits.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private bool isAutoFillingNeckBonesInspector button that runs FillNeckBonesFromRoot.
private bool isSettingUpNeckIKInspector button that runs SetupNeckIK.
private List<BoneWithRotationLimit> neckBonesThe neck bones with their rotation limit settings.
private Transform neckRootBoneBacking field for NeckRootBone.

Properties​

MemberWhat it is
Transform NeckRootBone { set; }Sets the root bone used to fill in the neck bones.

Methods​

MemberWhat it is
void FillNeckBonesFromRoot()Sets the neck bone list to the root bone, its first child and that child's first child.
void SetupNeckIK()Adds FABRIK, puts the neck bones in its chain and gives each a disabled angle rotation limit from its settings.
protected override void OnValidate()Runs the setup or auto-fill when their inspector buttons are pressed.