ClimbingSettings
A class in Root.Township, the global namespace.
Global settings for climbing: what can be grabbed, how hands pull the body, hand stamina drain and regen, and grab effects. Get it with ClimbingSettings.Instance.
- Listed in Global namespace: C to D
- Inherits or implements
GlobalSettings<ClimbingSettings> - Derived types
ClimbingSettings - Nested types
LayerStaminaConsumptionMultiplier - Attributes
GlobalSettings
Constructors
| Member | What it is |
|---|---|
ClimbingSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
33 private and internal fields
| Member | What it is |
|---|---|
private int activeTightGripLayer | Layer index used for the active tight grip (default 31). |
private AnimationCurve againstDrag | Curve of drag that resists velocity against the wanted direction. |
private float assumedBasePlayerWeight | Base player weight. Grip and pressure limits are multiplied by it, so a higher value needs more force to move. |
private float bodyHeight | Character controller height while climbing. |
private float bodyHeightTransitionDuration | Seconds to go from normal height to climbing height. |
private AnimationCurve distanceFromWallDirectionPower | Curve giving the power the push or pull alignment is raised to, based on arm stretch. |
private float extraResistPressurePerHand | Extra pressure per hand for resisting pull in the opposite direction, times the base weight. |
private AnimationCurve frictionFade | Friction over time after letting go. Starts at the curve's 0 while climbing. |
private PositionHandler grabBroken | Effect hook played when a hold breaks. |
private AnimationCurve grabHaptic | Haptic curve on a successful grab. |
private float grabRadius | Radius around the hand checked for climbable colliders (default 0.1). |
private PositionHandler grabSuccessful | Effect hook played on a successful grab. |
private AnimationCurve handDistanceDrain | Stamina drain multiplier from how far the ghost hand is from the climbing hand. |
private float hangDistance | Distance before an overburdened player stops being pulled down by gravity. |
private AnimationCurve holdBreakHaptic | Haptic curve from how close the hold is to breaking. |
private AnimationCurve incorrectHandStrengthModifier | Curve of strength gain or loss over time from ghost hand distance. |
private LayerMask layerMask | Layers checked for grabbing. |
private ClimbingSettings.LayerStaminaConsumptionMultiplier[] layerStaminaConsumptionMultipliers | Per-layer stamina use multipliers. Layers not listed use 1. |
private StatDefinition leftHandStamina | Stat used for left hand stamina. |
private float maximumGripPerHand | Most grip per hand, at full arm stretch, times the base weight. |
private float maximumPressurePerHand | Most pressure per hand including gravity resistance, times the base weight. |
private float minimumTimeBeforeConsideringShaking | Seconds since last climbing before a hand counts as shaking for regen. |
private AnimationCurve pressureFromDistance | Curve of velocity added from the ghost hand's distance to the grip point. |
private float pressureSmoothing | How much pressure is kept to smooth movement. Higher is smoother. |
private StatDefinition rightHandStamina | Stat used for right hand stamina. |
private float staminaHangMultiplier | Multiplier on stamina lost while hanging. |
private float staminaLossPerSecond | Stamina lost per second, based on the base weight. |
private float staminaRegenPerSecondIdle | Stamina regained per second when idle and not holding. |
private float staminaRegenShakeMultiplier | Regen multiplier when shaking the hand. |
private float startingValueForMaximumStamina | Starting maximum stamina used to scale shake regen in GetStaminaRegen. |
private float stepHeight | Height the character controller can step up while climbing. |
private float towardsPalmOffset | When placing a grip, how far the nearest mesh point is pulled back toward the hand. |
private float velocityDampening | Scale on the player's movement velocity used to offset the climbing hand's position in ClimbingHand. |
Properties
| Member | What it is |
|---|---|
int ActiveTightGripLayer { get; } | Layer index used for an active tight grip. Default 31. |
AnimationCurve AgainstDrag { get; } | Curve for drag that resists moving against the wanted direction. |
float AssumedBasePlayerWeight { get; } | Player weight the grip and pressure values are scaled by. Higher means more force needed. Default 80. |
float BodyHeight { get; } | Controller height while climbing. Default 1. |
float BodyHeightTransitionDuration { get; } | Seconds to change to climbing height. Default 0.2. |
IClimbable DefaultClimbable { get; } | Climbable settings used for surfaces without their own. |
AnimationCurve DistanceFromWallDirectionPower { get; } | Curve setting how much push and pull alignment counts, by arm stretch. |
float ExtraResistPressurePerHand { get; } | Extra pressure for resisting the opposite direction, times the base weight. |
AnimationCurve FrictionFade { get; } | Friction curve over time after letting go. |
PositionHandler GrabBroken { get; } | Effect hook when a hold breaks. |
AnimationCurve GrabHaptic { get; } | Haptic curve on a successful grab. |
float GrabRadius { get; } | Radius around the hand searched for grabbable colliders. Default 0.1. |
PositionHandler GrabSuccessful { get; } | Effect hook on a successful grab. |
AnimationCurve HandDistanceDrain { get; } | Curve for extra stamina drain by how far the ghost hand is from the gripping hand. |
float HangDistance { get; } | Distance before an overburdened player stops being pulled down. Default 0.8. |
AnimationCurve HoldBreakHaptic { get; } | Haptic curve by how close the hold is to breaking. |
AnimationCurve IncorrectHandStrengthModifier { get; } | Curve for strength gained or lost over time by ghost hand distance. |
LayerMask LayerMask { get; } | Layers checked for climbable surfaces. |
StatDefinition LeftHandStamina { get; } | Stat used for the left hand's stamina. |
float MaximumGripPerHand { get; } | Most grip one hand can apply (at full stretch), times the base weight. |
float MaximumPressurePerHand { get; } | Most pressure one hand can apply, including against gravity, times the base weight. |
AnimationCurve PressureFromDistance { get; } | Curve for velocity added by how far the ghost hand is from the grip point. |
float PressureSmoothing { get; } | Pressure kept to smooth movement. Higher is smoother. |
StatDefinition RightHandStamina { get; } | Stat used for the right hand's stamina. |
float StaminaHangMultiplier { get; } | Multiplier on stamina loss while hanging. Default 0.5. |
float StaminaLossPerSecond { get; } | Stamina lost per second, based on the base weight. Default 0.1. |
float StepHeight { get; } | Height the controller can step up while climbing. Default 1. |
float TowardsPalmOffset { get; } | When gripping, how far back towards the hand from the nearest surface point. Default 0.2. |
float VelocityDampening { get; } | Velocity dampening while climbing. Default 1. |
Methods
Used in
Members of other types that take, return or hold a ClimbingSettings: