Skip to main content

ClavicleControllerSettings

A class in Root.Township, Alta.Character.

Asset with the curves and limits for turning a player's collarbones toward where the hands are, so the shoulders follow the arms.

Constructors​

MemberWhat it is
ClavicleControllerSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

12 private and internal fields
MemberWhat it is
private AnimationCurve angleCrossfadeBlends the z rotation between the x-position and z-position curves by the hand's angle around the body (0 across, 90 in front, -90 behind).
private float clavicleXRotationMultiplierScales the result of targetXToClavicleRotation.
private float clavicleYRotationMultiplierScales the result of targetYToClavicleRotation.
private float clavicleZRotationMultiplierScales the result of targetZToClavicleRotation.
private bool isUsingElbowHandAverageForYRotationUses the average of the elbow and hand targets' height for the y rotation, instead of the hand alone.
private AnimationCurve targetXToClavicleRotationMaps the hand's sideways position (relative to the body) to clavicle z rotation.
private AnimationCurve targetYToClavicleRotationMaps the hand's height (relative to the body) to clavicle y rotation, the shrug.
private AnimationCurve targetZToClavicleRotationMaps the hand's forward position (relative to the body) to clavicle z rotation.
private float yRotationMaxUpper clamp for the clavicle's y rotation in degrees. Default 15.
private float yRotationMinLower clamp for the clavicle's y rotation in degrees. Default -15.
private float zRotationMaxUpper clamp for the clavicle's z rotation in degrees. Default 15.
private float zRotationMinLower clamp for the clavicle's z rotation in degrees. Default -15.

Properties​

MemberWhat it is
AnimationCurve AngleCrossfade { get; }Blend by hand angle between using the hand's X and Z position. 0 is across the body, 90 in front, -90 behind.
float ClavicleXRotationMultiplier { get; }Scale on the X rotation curve's result.
float ClavicleYRotationMultiplier { get; }Scale on the Y rotation curve's result.
float ClavicleZRotationMultiplier { get; }Scale on the Z rotation curve's result.
bool IsUsingElbowHandAverageForYRotation { get; }Whether Y rotation uses the average of elbow and hand instead of the hand alone.
AnimationCurve TargetXToClavicleRotation { get; }Curve from the target's X position to collarbone rotation.
AnimationCurve TargetYToClavicleRotation { get; }Curve from the target's Y position to collarbone rotation.
AnimationCurve TargetZToClavicleRotation { get; }Curve from the target's Z position to collarbone rotation.
float YRotationMax { get; }Largest Y rotation, in degrees.
float YRotationMin { get; }Smallest Y rotation, in degrees.
float ZRotationMax { get; }Largest Z rotation, in degrees.
float ZRotationMin { get; }Smallest Z rotation, in degrees.

Used in​

Members of other types that take, return or hold a ClavicleControllerSettings: