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
| Member | What it is |
|---|
SpineController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
float gravityWeigth | How strongly the spine follows the target's up, 0 to 1. |
1 private and internal field
| Member | What it is |
|---|
private Transform bodyTarget | Transform whose up direction the spine leans toward. |
Properties
| Member | What it is |
|---|
protected Quaternion[] CachedNeutral { get; private set; } | Starting local rotation of each bone after the first. |
Methods
| Member | What 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. |