Skip to main content

IClimbable

An interface in Root.Township, the global namespace.

Something a climbing hand can grip. Climbable is the usual component; anything without one counts as a DefaultClimbable, and NonClimbable blocks climbing.

Properties​

MemberWhat it is
bool CanClimb { get; }Whether hands may grab it at all.
bool CanMove { get; }Whether the object can move while climbed.
Vector3 CurentPressure { get; }Total pressure this step, fading out quickly once hands stop pushing (misspelt in the code).
float CurrentPressureRatio { get; }Current pressure as a fraction of the maximum.
NetworkEntity Entity { get; }The network entity the grip is stored relative to, so it follows a moving object.
float GripPriority { get; }Priority over other overlapping grips. Negative means ungrabbable; Climbable returns -1 for non-kinematic rigidbodies.
float MaximumPressure { get; }Pressure that breaks the grip. -1 means no limit.
float OldPressureRatio { get; }Last step's pressure as a fraction of the maximum. Drives the hold strain haptic.
bool ReleasesImmediately { get; }If true, hands let go of it straight away.

Events​

MemberWhat it is
event Action BreakRaised when the grip should break, such as from too much pressure. Climbing hands let go.

Methods​

MemberWhat it is
bool ApplyPressure(Vector3 pressure)Adds a hand's pressure for this physics step. False (and Break raised) if the total passes the maximum.
float GetGravityBoost(Vector3 normal)How much of gravity the grip takes on its own for a surface normal. The normal's y by default.

Used in​

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