Skip to main content

ClimberSettings

A class in Root.Township, the global namespace.

Global settings for an older climbing setup. Nothing else in this build reads it; climbing now uses ClimbingSettings through ClimbingHandler.

Constructors​

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

Fields​

MemberWhat it is
InfoDisplayerAccess gripAccessDebug info display for grip.
ClimberSettings.Raycast[] raycastsBacking field for Raycasts.
InfoDisplayerAccess strengthAccessLeftDebug info display for left hand strength.
InfoDisplayerAccess strengthAccessRightDebug info display for right hand strength.
24 private and internal fields
MemberWhat it is
private int activeTightGripLayerLayer index for a tight grip, probably. No other code reads this settings asset.
private float breakDistanceSquaredSquared hand distance at which a grip breaks, probably.
private float climbingFrictionFriction while climbing.
private float climbingHeightBody height while climbing.
private LayerMask climbingMaskLayers that can be climbed.
private float climbingStepHeightCharacter step height while climbing.
private float climbVelocityMultiplierScale for climbing velocity.
private AnimationCurve cornerAngleDotGripCurve for grip at corners by angle dot product.
private AnimationCurve cornerDotGripCurve for grip at corners by dot product.
private Climbable defaultClimbableClimbable used when a surface has none.
private float downGripOffsetYVertical grip offset when pulling down.
private float downGripOffsetZForward grip offset when pulling down.
private float gripHapticDurationHaptic length used by GetHapticOverUpwardAlignment.
private float gripMultiplierScales the result of GetGripStrengthMultiplier.
private AnimationCurve gripOverDistanceCurve from hand offset length to upward grip, blended by verticality.
private AnimationCurve gripOverVerticalityCurve from hand offset direction (y) to how much grip is kept regardless of distance.
private AnimationCurve hapticStrengthOverDistanceCurve from distance to haptic strength.
private AnimationCurve hapticStrengthOverUpwardAlignmentCurve from upward alignment to haptic strength.
private bool isRequiringClimbableWhether a surface needs a Climbable to be climbed, probably.
private float lowerMultiplierMultiplier for enabling gravity while lowering yourself.
private float minDistanceToApplyForceSquaredSquared hand movement below which no climbing force is applied, probably.
private AnimationCurve strengthOverDistanceCurve from hand offset length to grip strength, blended by verticality.
private float upGripOffsetYVertical grip offset when pulling up.
private float upGripOffsetZForward grip offset when pulling up.

Properties​

MemberWhat it is
int ActiveTightGripLayer { get; }Layer index for tight grip checks.
float BreakDistanceSquared { get; }Squared distance at which a grip breaks.
float ClimbingFriction { get; }Friction while climbing.
float ClimbingHeight { get; }Height used for climbing checks.
LayerMask ClimbingMask { get; }Layers that can be climbed.
float ClimbingStepHeight { get; }Step height while climbing.
float ClimbVelocityMultiplier { get; }Multiplier on climbing velocity.
AnimationCurve CornerAngleDotGrip { get; }Curve of grip strength against corner angle.
AnimationCurve CornerDotGrip { get; }Curve of grip strength against corner alignment.
Climbable DefaultClimbable { get; }Climbable used for colliders that have none.
float DownGripOffsetY { get; }Vertical grip offset when gripping downwards.
float DownGripOffsetZ { get; }Forward grip offset when gripping downwards.
float GripMultiplier { get; }Overall grip strength multiplier.
bool IsRequiringClimbable { get; }Whether only objects with a climbable can be climbed.
float LowerMultiplier { get; }Multiplier for enabling gravity while lowering oneself.
float MinDistanceToApplyForceSquared { get; }Squared distance below which no climbing force is applied.
ClimberSettings.Raycast[] Raycasts { get; }Ray start and end points used for climbing checks.
float UpGripOffsetY { get; }Vertical grip offset when gripping upwards.
float UpGripOffsetZ { get; }Forward grip offset when gripping upwards.

Methods​

MemberWhat it is
float GetGripStrengthMultiplier(SplitVector3 offset)Grip strength for a hand offset, from verticality and distance curves, times GripMultiplier.
void GetHapticOverUpwardAlignment(Controller controller, float upwardAlignment)Plays a haptic on the controller scaled by how upward the grip is.
void GetHapticStrengthOverDistance(Controller controller, float distance)Plays a haptic on the controller scaled by grip distance.
float GetUpwardGripMultiplier(SplitVector3 offset)Upward grip factor for a hand offset, from verticality and distance curves.