Overview | Videos | Documentation | Demos | Integrations | API | Support

Doc Home > How To > Setup a Ladder

The character is able to climb ladders if the Climb ability has been added to the Rigidbody Character Controller. In order for the character to climb a ladder, the ladder object must have the Climbable Object component added. For this example we will start with a basic scene that just has tree objects: the floor, upper platform, and ladder.

The first step is to add the Climbable Object component to the ladder. This component tells the ability that the object can be climbed and specifies any parameters for the object. When a Climbable Object is selected there are editor gizmos to show the mounting and dismounting positions.

The green gizmos indicate mounting positions and the red gizmos indicate dismounting positions. When the character is on the ladder the blue gizmos will indicate the player position. The actual mounting or dismounting occurs at the center of the vertical space.

The first thing that needs to be modified is the mounting position so there is a green gizmo at the bottom of the ladder and a green gizmo at the top of the ladder. The mount offsets are in local space relative to the ladder Transform. A value of -1 for the mount/dismount offset indicates that the value is not used - the character's position for that axis will be used. The character should be centered on the ladder when mounting so an offset of 0 is specified for the x on both the top and bottom offset. The Bottom Mount Offset is too high so a value of -1.87 is specified to bring the mount position down. The Z offset specifies the distance away from the ladder that the character should start to play the mount animation. A value of 0.5 for the Bottom Mount Offset and a value of -0.62 is used for the Top Mount Offset. After each value change the gizmos will update to reflect their new position:

With the mount offsets set, it is now time to set the dismount position. The ladder is a unique Climbable Object because the dismount offset do not need to be explicitly set. This value can instead be computed based on the Run Separation and the Unusable Top Rungs. The Run Separation is the number of units in between ladder rungs. For this ladder the value is 0.3117. The Unusable Top Rungs specifies the number of rungs that should only be used if the character is dismounting. As soon as the character's position passes the top dismount gizmo the character will start to play the dismount animation. We used a value of 4 for this ladder. The dismount gizmos will update to reflect the changes:

The Climbable Object is now setup to be climbed. The Climb ability still needs to be added to the character in order for the character to actually be able to climb the ladder. No special values need to be setup on this ability to allow the character to climb - just ensure the Climbable Layer specifies the same layer that the Climbable Object is in. Once this is complete your character will be able to mount and dismount on a ladder!

<- Replace the Used Animation
Setup an Interactable Object ->