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
| Member | What it is |
|---|
NeckIKControllerHelper() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private bool isAutoFillingNeckBones | Inspector button that runs FillNeckBonesFromRoot. |
private bool isSettingUpNeckIK | Inspector button that runs SetupNeckIK. |
private List<BoneWithRotationLimit> neckBones | The neck bones with their rotation limit settings. |
private Transform neckRootBone | Backing field for NeckRootBone. |
Properties
| Member | What it is |
|---|
Transform NeckRootBone { set; } | Sets the root bone used to fill in the neck bones. |
Methods
| Member | What 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. |