Climbable elements are much more complex than Obstacles as they allow Characters to decide how to traverse them, either via input or automatically.
Similar to Obstacles, Climbable elements are composed of a Climbable component that references a Climbable Clip, which determines how the Character will traverse this particular Climbable element.
Climbable components define the boundaries of a segment in Local Space from which a Character can move along, but not any further.
The Clip field is a reference to a Climbable Clip, which contains all the necessary information for the Character to traverse this Climbable element. For more information about Climbable Clips, see the section below.
The Can Drop field determines whether a Character can let go from this climbable object or not. This is very useful in some cases, where you don't want the player to be able to exit the climbable, such as while being on a Balance plank.
The Climbable Path A and Climbable Path B are two points in Local Space that determine a segment from where a Character can freely move.
Also, each point A and B has an Angle field, which represents the direction in which a Character will look at while traversing this climbable element.
Commute From A and Commute From B fields are optional ones that make it possible to commute to another Climbable or Obstacle when reaching the edge of the Climbable.
The Reachables field is similar to the Commute From fields, but unlike them, these require from the player's input and have a finite jump distance.
Before going any further, let's see how Reachables work with an example: Imagine there's a Character holding onto a Ledge Braced climbable. Upon reaching the right corner, the Character will require the player's input and a directional direction to jump to the next ledge, if any.
However, placing each Reachable in the Reachables array field can be tedious and a slow process. So in order to make life easier for game designers, the Traversal module automatically detects Reachable elements around them and fills the array with them any time the Climbable element is modified in the Scene View.
There may be some cases in which you don't want Climbable elements to refill their Reachables array. For those cases one can disable the Auto-Connect field.
Similar to Obstacle Clips, Climbable Clips allow to define how a Character will traverse a Climbable element and reuse this logic on other elements.
The Climbable Clip is split in three big sections: General parameters, Animations and Player.
General parameters are very similar to the ones found in the Obstacle Clip. Offset Upward and Offset Forward allow to define an offset in local space relative to the Character from where the "grab" will be originated.
By default the origin of the handles are at the root of the Character (usually at the bottom-most position of the Character, between their feet). However, some Climbable elements look better if the Character aligns itself.
The Ignore Collisions field allows Characters to ignore any collisions when traversing the current Climbable element.
The Orientation field defines whether the Climbable element is vertical or horizontal. This field has a direction impact on how a Character will detect other reachable elements.
If the Climbable element is set to Vertical, the forward and backward input will search for climbable elements that are in the XY plane (above or below).
If the Climbable element is set to Horizontal, forward and backward input will look for other reachable elements on the XZ plane (in front or back)
The Transition field defines how much will it take for a Character to completely engage with the Climbable element.
It can either be by a certain Duration or by Speed, depending on the distance to the Climbable element and the Character.
A Climbable Clip requires 3 Animator Controllers in order to work. Each of these should be an Animator Override Controller that implement either the Traversal or the Reachable Animator Controllers.
The Animator Controller field references a Runtime Animator Controller that has a very specific structure. This controller defines the locomotion animations and how the character moves along the Climbable element.
The Grab Controller references a Runtime Animator Controller that controls which animation should be played when a Character first grabs the Climbable element.
The Reach Controller references a Runtime Animator Controller that controls which animation should be played when a Character jumps/reaches from the current Climbable onto another one.
The Reach Start Delay field determines, in seconds how much should the Character wait before moving from the current Climbable element to the next one, when reaching to another object.
Reach Transition allows to control how long will it take for a Character to jump/reach from the current Climbable element to the next one. It can either be using a fixed Duration or by Speed.
Similar to the Reach Start Delay, the Reach End Delay field allows to define how many seconds the character will be unresponsive after reaching for a new Climbable element.
Move Forward Speed and Move Backward Speed fields define the speed at which a Character can move along the Climbable element. The units of this field are Unity units per second.
These parameters define how a Character interacts with the Climbable element. The Input Movement field defines how the character knows when to move forward or backwards. The default value is Directional, which are the WASD keys on a keyboard or the left joystick on controllers.
The Input Key Drop field allows to define a key that, upon being pressed, the Character will let go of the current Climbable element, unless the Climbable component has the "Can Drop" field unchecked. This button is typically associated with the Cancel button.
The Input Key Traverse field defines which key will be used to reach for other Climbable or Obstacle elements. This button is typically associated with the Space or Jump button.
The Max Traverse Distance field defines how far a Character can jump in order to reach other elements.
This value can be visualized when selecting a Climbable element with Reachable elements associated with it. The green lines that are drawn have a length between 0 and the Max Traverse Distance, so it's easy to determine whether a Character can reach another element or not.