Free Climb
The FreeClimb ability allows the character to move in all directions on a climbable object. The character can traverse curved rough surfaces and make 90 degree turns. They are also able to leap in an upwards direction for quicker movement.
Setup
- Select the + button in the ability list under the “Abilities” foldout of the Ultimate Character Locomotion component.
- Add the “Climbing Pack/Free Climb” ability. This ability should be positioned near the top of the list so it will override any abilities beneath it.
- Add any states to the components that should activate when Free Climb in active. In the demo scene the following states are added:
- The Airborne state added to the Free Climb ability.
- The FreeClimb state added to the Animator Monitor component.
- The FreeClimb state added to the Character IK component.
- The FreeClimb state added to the arm Third Person Object components (only used for first person).
- The FreeClimb state added to the Camera Controller (only used for first person).
- Setup the climbable object that the that the character should climb on. The climbable object should either be in the specified Layer Mask or contain the Object Identifier component with the specified Object ID. See the Detect Ground Ability Base class for more information on these parameters.
- If the character can start to free climb from the top of the object the Move Towards Location component should be added to the climbable object. The z Offset needs to be set as the x and y offset values will be adjusted based on the character’s location. The Yaw Offset should be set to 0.
Troubleshooting Tips
- The character plays the mounting animation immediately on the top of the object instead of going to the edge. This will occur if the Move Towards Location component can’t be found on the climbable object. Ensure you have added this component and adjusted the properties (step 5 from above).
- The character plays the top dismount animation too early. The dismount location is detected by the Top Dismount Offset parameter. If the character is playing the dismount animation too early this value should be decreased.
Inspected Fields
Airborne Auto Start
Can the ability auto start when the character is airborne?
Draw Debug Lines
Should debug lines be drawn to the editor indicating the location of the horizontal and vertical casts?
Allowed Movements
Specifies which hang movements the character can perform.
- InAirMount: The character can mount while in the air.
- InnerCornerTurn: The character can perform an inner 90 degree turn.
- OuterCornerTurn: The character can perform an outer 90 degree turn.
- Leap: The character can leap climb in the upward direction.
- BottomDismount: The character can dismount on the bottom.
- TopDismount: The character can dismount on the top.
- StartFromHorizontalHang: The character can start climbing from a horizontal position of the Agility Pack Hang ability.
- StartFromVerticalHang: The character can start climbing from a vertical position of the Agility Pack Hang ability.
Stop Climb On Jump
Should the ability stop if the jump button is pressed?
Bottom Mount Distance
The distance from the climbing object that the character should start mounting.
Climb Offset
The offset from the character to the climb object.
Move Towards Speed
The speed that the character moves towards the climbing object.
Horizontal Edge Offset
Specifies the distance from the character’s center position when the character should stop moving horizontally when near the edge of the climb object.
Inner Corner Offset
Specifies the distance from the character’s center position when the character should transition to an inner corner.
Bottom Edge Offset
Specifies the distance from the character’s pivot position when the character should stop moving down near the edge of the climb object.
Top Edge Offset
Specifies the distance from the character’s pivot position when the character should stop moving up near the edge of the climb object.
Hang IK Cast Offset
The offset between the character’s hand and the IK raycast target.
Foot IK Cast Offset
The offset between the character’s foot and the IK raycast target
Hang IK Offset
The offset to apply to the hand position relative to the object hit at the hand position.
Foot IK Offset
The offset to apply to the foot position relative to the object hit at the foot position.
Bottom Dismount Offset
Specifies the distance from the character’s pivot position when the character should dismount when near the bottom of the climb object.
Top Dismount Offset
Specifies the distance from the character’s pivot position when the character should dismount when near the top of the climb object.
Leap Edge Offset
Horizontal and vertical distance specifying the edge offset when the character is leaping.
Start Hang Offset
The offset used to check for a climbable object if the hang ability is active.