An abstract class in Root.Township, Alta.Character.
Base for the simple bone-chain controllers (NeckController, SpineController): maps a list of rig bones from the character dummy and gives them a rotation buffer and lerp factor.
Constructors
| Member | What it is |
|---|
protected SimpleIKController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private BoneIdentifier[] bones | The rig bones in the chain. |
private CharacterDummyPointer dummy | Pointer to the character dummy whose rig holds the bones. |
private float lerp | Backing field for Lerp. Default 0.5. |
Properties
| Member | What it is |
|---|
protected Transform[] Bones { get; private set; } | The mapped bone transforms, in chain order. |
protected int BonesLength { get; private set; } | Number of bones in the chain. |
protected Quaternion[] FrameRotations { get; private set; } | Scratch buffer for each bone's rotation this frame. |
protected float Lerp { get; } | Blend factor from 0 to 1 used by subclasses. |
Methods
| Member | What it is |
|---|
protected virtual void Awake() | Maps the bone identifiers to the dummy's bones and sets up the rotation buffer. |