The Ledge Strafe ability will play a strafing animation while the character is on a ledge. This ledge should be narrow to prevent the character from being able to walk normally across it. A wall must exist on one side of the ledge that the character can lean against.

Setup

  1. Select the + button in the ability list under the “Abilities” foldout of the Ultimate Character Locomotion component.
  2. Add the Ledge Strafe ability. This ability should be near the top of the ability list so it overrides any lower priority ability.
  3. Set the State name to “LedgeStrafe” and add the crawl states to other objects that should change values when Ledge Strafe is active. In the demo scene the Character IK and Capsule Collider Positioner components have a LedgeStrafe added.
  4. Setup the ledge that the character can strafe on. The ledge 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.
  5. A solid object should exist on one side of the ledge that the character can lean against.

Inspected Fields

Detect Wall Distance

The distance to detect a wall before the ability can start.

Horizontal Start Offset

The distance to check to the left and right of the initial wall position to determine if location is a valid starting position.

Wall Offset

The distance that the character should stand away from the wall.

Gap Offset

The distance away from the wall that the gap exists.

Can Start Gap Offset Cast Radius

The radius of the cast when determining if a gap exists and the ability is determining if it can start.

Active Gap Offset Cast Radius

The radius of the cast when determining if a gap exists and the ability is active.

Start Move Towards Wall Speed

The speed that the character should move towards the wall when starting.

Stop Force

The amount of force to apply when the ability stops from input or the jump ability. This will push the character away from the wall.

Stop Force Frames

The number of frames to apply the force in when the ability stops from input or the jump ability. This will push the character away from the wall.