In this live build, we dive into the core code of the advanced ledge system in Unreal Engine 5 (with GASP 5.5). Step by step, I walk through capsule trace setup, collision presets, tag-based ledge angles, timeline-driven corrections, and montage selection logic. You’ll see how to prepare your Blueprint variables, structure animation data, disable strafing/aiming, and prevent input bugs while climbing.
Most valuable lessons and insights
Separate standard vs premium features: Standard build keeps navigation simple (left/right/up/down), while premium adds inner/outer corners, freehang, leap 180, climb up on top and others. This avoids overwhelming beginners while still giving upgrade paths.
Always define a ledge object channel & collision preset: Create a “Ledge” channel in Project Settings and use custom presets so traces only hit stripes you want. It prevents debug clutter and improves clarity.
Tags define angles reliably: Each ledge stripe must have a tag (0, 90, 180, etc.). These tags drive angle calculations and montage selection. Automating them is possible, but tags remain the cleanest method.
Use timelines to smooth attach & navigation: Separate timelines handle the first attach and the correction of rotation/location. Without this, animations snap or float off the geometry.
Enum + struct = scalable montage control: Store montages in a struct, use an enum for direction (Up, Down, Left, Right, etc.), and select dynamically. Keeps Blueprint tidy and expandable.
Block inputs during climbing: Disable strafing, aiming, and extra keys while in ledge mode to prevent camera/rotation conflicts and bug spam.
State machines for climbing poses: Blend into a dedicated “Ledge Idle” state once climbing starts, so characters don’t hover or default back to locomotion poses.
📁 Resources & links
Download all the project files from all the livestreams:
/ locodev
Document of the Ledge System(work in progress
): https://docs.google.com/document/d/1z...
📌 Unreal Engine Version used: UE5.5
Link of the animations I'm using: https://www.fab.com/listings/fbfda52a...
👇 Follow me on social media:
Discord Server: / discord
Twitter: / locodev7701
Instagram: / devloco
Chapters
00:00:00 Intro & waiting for chat
00:02:53 Patreon tiers: standard vs premium ledge features
00:04:48 Why standard excludes corners & freehang
00:06:28 Ledge stripes & tag overview
00:07:00 Creating ledge object channel in collisions
00:08:15 Attach detach logic with F key
00:09:12 Capsule trace for ledge detection
00:10:59 Saving trace hit results to variables
00:12:12 Input blocking & character state updates (GASP)
00:13:39 Playing ledge catch montage via struct
00:15:26 Rotation & smoothness differences in GASP 5.5 vs 5.6
00:17:08 Timelines for attachment vs correction
00:20:15 Enhanced input system & macros for values
00:23:14 Sphere trace offset driven by WASD input
00:25:17 Ledge trace detection climb vs default move
00:27:19 Dual timelines: attach vs correction
00:30:02 Input validation before continuing code
00:31:21 Processing ledge target data (impact, rotation, reach distance)
00:36:52 Could tags be automated? (performance tradeoffs)
00:40:52 Calculating delta between current & target angle
00:42:20 Using enums for ledge direction (Up, Down, Left, Right)
00:46:14 Montage selector by direction, distances, offsets
00:49:41 Cancel safeguards & “no valid direction” handling
00:51:01 Short, medium, long montage setups
00:55:12 Play montage - retrigger delay - correction timeline
00:57:39 Why beginners benefit from seeing “messy” code live
01:01:02 Root motion + timelines for final precision
01:02:55 Timeline lengths (22 ms attach/correction)
01:04:29 Updating ledge angles post-timeline
01:06:07 Input restrictions: no aiming while climbing
01:07:56 Debugging in slow motion
01:09:09 Showing full premium system (inner/outer corners)
01:20:04 Importing & retargeting ledge animation pack to UFN
01:23:44 Adding animations to project & creating montages
01:26:01 Creating new ledge system graph in SandboxCharacter
01:28:36 Capsule trace setup with offsets & radii
01:31:08 Building ledge stripes with custom collision preset
01:34:28 Blueprint variables setup (booleans, transforms, montages)
01:42:43 Attach vs detach logic (branches)
01:46:02 Capsule trace attach collapsed node
01:49:56 Saving trace hit & checking result
01:52:54 Preparing character movement (set to flying, disable collision)
01:56:12 Playing ledge catch montage (retargeted anims)
02:17:53 Batch-enable root motion on all animations
02:20:30 Blend poses by bool to switch locomotion ↔ ledge idle
02:21:59 Character now attaches but camera glitch appears
02:22:25 Plan: use timelines to correct clipping
02:26:58 Saving ledge angle from tags (collapsed function)
02:30:13 Wrap up, continuation planned for tomorrow