First Person Lean shifts and rolls the first-person camera without moving or rotating the character body. A signed input selects the side, and Capsule or Sphere probes limit the camera response near solid cover. Lean is concurrent and uses no Animator ability index or State by default.

Add Lean to the character

  1. Use a first-person character with an active first-person camera view type and Ultimate Character Locomotion Handler for player axis updates.
  2. In Ultimate Character Locomotion > Abilities, select + > Lean from the first-person abilities. Keep Start Type: Axis, Stop Type: Axis, and Input Names: Lean.
  3. Confirm Colliders contains a generated LeanCollider for each character model. Adding Lean normally creates them; use Add Colliders in its drawer when needed.
  4. Position and size each probe’s Capsule Collider around the upper-body/head clearance area. Use only valid Capsule or Sphere Colliders, with no null entries. The drawer places generated objects on Ignore Raycast.
  5. Include blocking surfaces in Character Layer Manager > Solid Object Layers. Trigger Colliders are ignored. Tune distance, tilt, and probe placement together on the project’s actual cover geometry.

Lean can run alongside locomotion. It disables on a change to third person and enables again when first person becomes active.

Configure the signed axis

The Lean input must produce positive and negative values, returning to zero when released. In UCC’s generated legacy Input Manager setup, Z is positive and X negative. For Input System, bind a signed one-dimensional composite or equivalent action named Lean.

A nonzero axis starts the ability. Changing directly between signs changes the active side; returning to zero stops and recenters it. Swap positive/negative bindings if sides feel reversed, keeping Distance positive.

Tune camera, item, and probes

Inspector field Default Purpose
Distance 0.7 Maximum sideways camera displacement. Use a positive distance suited to the available cover clearance.
Tilt 7 degrees Camera roll. Reduce independently when roll feels excessive.
Item Tilt Multiplier 2 Scale first-person item roll: 0 keeps it upright; 1 matches the camera.
Colliders Generated during setup Capsule/Sphere probes for each model. Fit height, radius, and local position to that model.
Collider Offset Multiplier 0.75 Probe offset as a fraction of Distance, from centerline 0 to full offset 1.
Max Collision Count 5 Capacity of the overlap query. Increase for dense geometry with many simultaneous blockers.

First Person Lean uses Axis start and stop with Lean input, Distance 0.7, Tilt 7, Item Tilt Multiplier 2, Collider Offset Multiplier 0.75, and Max Collision Count 5.

While active, a probe stays at its maximum configured side offset. Overlap/penetration checks against solid non-trigger geometry scale camera distance and tilt together. Check initial probe clearance before increasing the camera distance; a probe already inside a wall or another solid object gives an unsuitable starting setup.

Lean sends OnCharacterLean(float distance, float tilt, float itemTiltMultiplier) on relevant changes. The first-person camera applies the position/rotation spring offsets; first-person items use tilt scaled by the item multiplier. Stopping sends zero distance/tilt and deactivates the probes. Public properties include Distance, Tilt, ItemTiltMultiplier, Colliders, and ColliderOffsetMultiplier.

Verify both sides and every model

  1. In open space, hold each signed binding. Lean should show (Active), shift the camera, and roll the view without shifting the body. Change signs without releasing and confirm the active side changes.
  2. Release the input. The view and item should recenter, (Active) should disappear, and probe objects should deactivate.
  3. Test walls on both sides, then move away while holding lean and retest neutral and opposite-side input. Check that the resulting clearance and camera response meet the intended peek distance throughout the route.
  4. Repeat beside a trigger volume; it should not restrict the lean. For missed solid cover, inspect probe placement, Solid Object Layers, and overlap capacity.
  5. Switch through every supported character model and equipped first-person item. Confirm probe fit and item roll, then switch perspectives and confirm Lean follows first-person availability.

For an absent lean, inspect first-person availability, the signed action, axis start/stop settings, and assigned probes. Correct genuine probe overlaps before tuning distance. For excessive item roll, lower Item Tilt Multiplier independently of the camera tilt.

See First Person view type, Input, Input System integration, Layer Manager, and First Person Perspective Item for the receiving camera, input, layers, and item setup.