Skip to main content

SpineController

A class in Root.Township, Alta.Character.

Simple spine IK that bends each spine bone toward the body target's up direction, less so further up the chain.

Constructors​

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

Fields​

MemberWhat it is
float gravityWeigthHow strongly the spine follows the target's up, 0 to 1.
1 private and internal field
MemberWhat it is
private Transform bodyTargetTransform whose up direction the spine leans toward.

Properties​

MemberWhat it is
protected Quaternion[] CachedNeutral { get; private set; }Starting local rotation of each bone after the first.

Methods​

MemberWhat it is
override void UpdateCharacterComponent()Turns each bone toward the body target's up, with the blend shrinking by Lerp per bone.
protected override void Awake()Maps the bones and caches each bone's starting local rotation.