ShoulderTwistController
A class in Root.Township, Alta.Character.
Character rig component that slowly twists the shoulder around the shoulder-to-elbow axis to follow the hand, within a rotation limit.
- Listed in Players and characters
- Inherits or implements
CharacterComponentController - Derived types
ShoulderTwistControllerHelper
Constructors
| Member | What it is |
|---|---|
ShoulderTwistController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
9 private and internal fields
| Member | What it is |
|---|---|
private Transform body | Backing field for Body. |
private Transform elbow | Backing field for Elbow. |
private Transform hand | Backing field for Hand. |
private Vector3 handVector | Last elbow-to-hand vector in shoulder space. |
private Vector3 rotationAxis | Shoulder-to-elbow axis the twist is applied around. |
private RotationLimit rotationLimit | Backing field for RotationLimit. |
private Transform shoulder | Backing field for Shoulder. |
private float speed | Twist speed in degrees per second (default 5). |
private float startAngle | Forearm angle at Start, which the twist direction is measured from. |
Properties
Methods
| Member | What it is |
|---|---|
override void FixedUpdateCharacterComponent() | Rotates the shoulder towards the hand's angle at speed, applies the limit and keeps the elbow's rotation unchanged. |
3 private and internal methods
Used in
Members of other types that take, return or hold a ShoulderTwistController: