The Hang ability allows the character to hang from flat objects. The hang ability is NOT able to climb up any object and is only designed for hanging. While hanging the character can:

  • Start hanging from the ground or mid jump/fall.
  • Start hanging by dropping down onto the hang object.
  • Shimmy.
  • Shimmy across curved objects.
  • Transfer to another hang object in the vertical or horizontal direction.
  • Pull up from a hang and stop the ability.

Hanging involves just the use of the character’s arms and it is not meant for the character to be able to free climb with their feet as well.

Hang is a ledge state machine rather than a single animation. It can align into a hang, shimmy along the current edge, transfer to another edge, pull up, drop, or hand control to a compatible Climbing Pack ability. Allowed Movements determines which of those branches are available in a particular character design.

Setup

  1. Position Hang near the top of the ability list, above Fall and below Jump.
  2. Ensure the hang animations have been added to the character. All Agility Pack abilities can be setup through the Add-Ons Manager or by selecting the "Build Animator" button under the Editor foldout of the Hang ability.
  3. Determine how the Hang ability should detect any hang objects. The Agility Pack demo scene adds an Object Identifier to each hang object and then the Hang ability detects which object it can hang on using a custom cast based off of the Object Identifier ID:
  4. Setup each hang object to be detected by the Hang ability. For the demo scene the Object Identifier component was added with an ID of 104.
  5. Modify the Hang’s Minimum Start Offset and Maximum Start Offset. This offset specifies the range that the Hang ability should detect other hang objects. In the screenshot below the vertical offset is shown with the black debug line. The bottom of the line is represented by the y value of the Minimum Start Offset, and the top of the line is represented by the y value of the Maximum Start Offset. Debug lines can be drawn if Draw Debug Lines is enabled. The black line in the image below represents the cast area which determines if Hang can start.
  6. Modify the Relative Hang Offset. This value represents the distance that the character should be placed away from the hang object while in a shimmy position.
  7. The remaining fields should work well at their default values. See the Inspected Fields below for a description of each field.

Key settings

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.

  • DropDown: The character can drop down from above the hang object.
  • TransferUp: The character can transfer vertically from one hang object to another.
  • TransferHorizontal: The character can transfer horizontally from one hang object to another.
  • PullUp: The character can pull themselves up to end the ability.
  • DropToStop: The character can drop to stop the ability.
  • StartFromHorizontalClimb: The character can start hanging from a horizontal climb position. This movement requires the Climbing Pack.
  • StartFromVerticalClimb: The character can start hanging from a vertical climb position. This movement requires the Climbing Pack.

Minimum Start Offset

The minimum offset from the character’s pivot that the ability can perform a movement.

Maximum Start Offset

The maximum offset from the character’s pivot that the ability can perform a movement.

Relative Hang Offset

The offset from the top of the character to the hang object.

Start Move Towards Speed

The speed that the character moves towards the starting position.

In Position Shimmy Distance

The character can shimmy when the vertical distance between the character and hang object is less than the specified amount.

In Position State Name

The name of the state when the character is in hang position.

Move Up Button Name

The name of the button that will transfer or pull the character up to the next hang state.

Change State Sensitivity

Specifies how sensitive the ability is when determining the next state. A value is 0 is the most sensitive while a value of 1 is the least.

Shimmy Offset

Offset to detect hang objects when shimmying.

Hand IK Offset

Offset to apply to the hand position relative to the object hit at the hands position.

Pull Up Cast Distance

The distance that should be checked to determine if the character can pull up without any obstructing objects.

Stop Hang On Jump

Should the ability stop if the jump button is pressed?

Start Climb Offset

The offset used to check for a valid hang object if a climbing ability is active. This field will appear when the Climbing Pack is installed.

Start Vertical Climb Offset

The offset used to check for a valid hang object if the character is moving vertically with the free climb ability. This field will appear when the Climbing Pack is installed.

Author a hang route

Hang needs a detectable face and a stable top edge. Use continuous colliders where the character should shimmy without interruption. At a curved section, avoid sudden changes in the surface normal and test both directions. For a deliberate transfer, leave a gap that the normal shimmy probe cannot cross but that the enabled vertical or horizontal transfer cast can reach.

The space above the ledge is also gameplay data. Pull Up Cast Distance must find a clear volume before pull-up is allowed; railings, low ceilings, or decorative colliders can correctly block that exit even when the hands can reach the ledge.

Tune the hang in phases

  1. Enable Draw Debug Lines and tune Minimum Start Offset and Maximum Start Offset until only the intended ledge is acquired.
  2. Tune Relative Hang Offset and Start Move Towards Speed so the root reaches the hanging pose without a snap.
  3. Tune In Position Shimmy Distance and Shimmy Offset on a straight ledge.
  4. Enable and test one transfer or exit movement at a time.
  5. Apply Hand IK Offset only after the root and edge detection are stable.

Change State Sensitivity affects when the ability accepts that the geometry represents a new hang state. Increase it when small collider changes cause unwanted transitions; decrease it when intentional corners or transfers are ignored.

Integrate the Climbing Pack

The Hang and climbing abilities must opt into the same transition. For example, enabling Start From Vertical Climb on Hang is only one side; Free Climb must also allow the matching Hang transition. Tune Start Climb Offset and Start Vertical Climb Offset from the actual hanging and climbing poses because their roots need not occupy the same point.

If the character can hang but cannot shimmy, inspect In Position Shimmy Distance and the next Shimmy Offset probe. If pull-up never becomes available, check the enabled flag and clearance cast above the ledge. If the ability acquires a ledge behind or below the intended one, narrow the start-offset range and the detection filter before changing the alignment pose.