Skip to main content

BodyControllerSettings

A class in Root.Township, Alta.Character.

Settings asset for how a player's body follows the head and hands: heading, pitch and roll from head movement, bending when moving, and smoothing speeds.

Constructors​

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

Fields​

28 private and internal fields
MemberWhat it is
private float bodyForwardBendMultiplierBacking field for BodyForwardBendMultiplier: how far the body bends the other way when the head nods. Default 1.5.
private float bodyPitchMultiplierBacking field for BodyPitchMultiplier.
private float bodyRollMultiplierBacking field for BodyRollMultiplier. Default -1.
private float bodySideBendMultiplierBacking field for BodySideBendMultiplier: how far the body bends the other way when the head tilts. Default 1.5.
private AnimationCurve distanceToMovedToBendAngleBacking field for DistanceToMovedToBendAngle.
private AnimationCurve handPositionHeadingImpactBacking field for HandPositionHeadingImpact.
private float handPositionWeightBacking field for HandPositionWeight.
private AnimationCurve handWeightByDistanceFromBodyBacking field for HandWeightByDistanceFromBody.
private float headForwardLimitBacking field for HeadForwardLimit. Default 0.2.
private AnimationCurve headHeadingImpactOnRollBacking field for HeadHeadingImpactOnRoll: how much head roll is used, by head heading.
private AnimationCurve headHeadingPitchImpactBacking field for HeadHeadingPitchImpact: how much head pitch is used, by head heading.
private float headingHeadRotationWeightBacking field for HeadingHeadRotationWeight.
private Vector3 headOffsetBacking field for HeadOffset.
private AnimationCurve headPitchImpactOnBodyPitchBacking field for HeadPitchImpactOnBodyPitch.
private AnimationCurve headPositionPitchAngleBacking field for HeadPositionPitchAngle.
private float headPositionWeightBacking field for HeadPositionWeight. Marked "NOT used anymore" in the inspector.
private AnimationCurve headRollToBodyRollImpactBacking field for HeadRollToBodyRollImpact.
private AnimationCurve headRotationHeadingImpactBacking field for HeadRotationHeadingImpact.
private bool isBendingWithMovementBacking field for IsBendingWithMovement. Default true.
private bool isChangingHeadingBacking field for IsChangingHeading. Default true.
private bool isChangingPitchBacking field for IsChangingPitch. Default true.
private bool isChangingRollBacking field for IsChangingRoll. Default true.
private float minMovementToBendBacking field for MinMovementToBend, stored squared. Default 0.0001.
private float movementBendLerpSpeedBacking field for MovementBendLerpSpeed. Default 0.2.
private float pitchHeadPositionWeightBacking field for PitchHeadPositionWeight.
private float pitchHeadRotationWeightBacking field for PitchHeadRotationWeight.
private AnimationCurve positionLerpSpeedBacking field for PositionLerpSpeed.
private AnimationCurve rotationLerpSpeedBacking field for RotationLerpSpeed.

Properties​

MemberWhat it is
float BodyForwardBendMultiplier { get; }How much the body bends the other way when the head nods. Default 1.5.
float BodyPitchMultiplier { get; }Multiplier on body pitch. Default 1.
float BodyRollMultiplier { get; }Multiplier on body roll. Default -1.
float BodySideBendMultiplier { get; }How much the body bends the other way when the head tilts sideways. Default 1.5.
AnimationCurve DistanceToMovedToBendAngle { get; }Curve from distance moved to body bend angle.
AnimationCurve HandPositionHeadingImpact { get; }Curve for how much hand position turns the body.
float HandPositionWeight { get; }Weight of hand position on body heading.
AnimationCurve HandWeightByDistanceFromBody { get; }Curve weighting each hand by how far it is from the body.
float HeadForwardLimit { get; }Limit on how far forward the head can lead. Default 0.2.
AnimationCurve HeadHeadingImpactOnRoll { get; }Curve for how much head roll is used, by head heading.
AnimationCurve HeadHeadingPitchImpact { get; }Curve for how much head pitch is used, by head heading.
float HeadingHeadRotationWeight { get; }Weight of head rotation on body heading.
Vector3 HeadOffset { get; }Offset from the head to the body.
AnimationCurve HeadPitchImpactOnBodyPitch { get; }Curve from head pitch to body pitch.
AnimationCurve HeadPositionPitchAngle { get; }Curve from head position to pitch angle.
float HeadPositionWeight { get; }Marked in the inspector as no longer used.
AnimationCurve HeadRollToBodyRollImpact { get; }Curve from head roll to body roll.
AnimationCurve HeadRotationHeadingImpact { get; }Curve for how much head rotation turns the body.
bool IsBendingWithMovement { get; }Whether the body leans when moving. Default true.
bool IsChangingHeading { get; }Whether the body turns with the head and hands. Default true.
bool IsChangingPitch { get; }Whether the body pitches with the head. Default true.
bool IsChangingRoll { get; }Whether the body rolls with the head. Default true.
float MinMovementToBend { get; }Smallest movement (squared) that causes a lean.
float MovementBendLerpSpeed { get; }Smoothing speed for the movement lean. Default 0.2.
float PitchHeadPositionWeight { get; }Weight of head position on pitch. Default 1.
float PitchHeadRotationWeight { get; }Weight of head rotation on pitch. Default 1.
AnimationCurve PositionLerpSpeed { get; }Curve for position smoothing speed.
AnimationCurve RotationLerpSpeed { get; }Curve for rotation smoothing speed.

Used in​

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