Skip to main content

SpineIKHelper

A class in Root.Township, Alta.Character.

Editor helper that fills in three spine bones from a root bone and builds a FABRIK chain with rotation limits aimed at a spine target.

Constructors​

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

Fields​

6 private and internal fields
MemberWhat it is
private bool isAutoFillingSpineBonesInspector button that runs FillReferencesFromRoot.
private bool isSettingUpIKInspector button that runs SetupIKBones.
private Transform spineBoneRootBacking field for SpineBoneRoot.
private List<BoneWithRotationLimit> spineBonesThe spine bones with their rotation limit settings.
private FABRIK spineIKThe FABRIK component made by SetupIKBones.
private Transform spineTargetTransform the spine IK reaches for.

Properties​

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

Methods​

MemberWhat it is
void FillReferencesFromRoot()Sets the spine bone list to the root bone, its first child and that child's first child.
void SetupIKBones()Adds FABRIK, puts the spine bones in its chain with disabled angle limits and sets the spine target.
1 private and internal method
MemberWhat it is
private void OnValidate()Runs the setup or auto-fill when their inspector buttons are pressed.