This is a good candidate for one of the "much harder than it seems at first" problems--particularly, because there's so many little problems that need to be solved:
* Detecting the collision
* Gluing the actor to the ledge
* Suspending actor gravity while the actor is hanging
* Moving the actor during the climb state
* Interrupting the climb if the actor is hit
* Re-enabling gravity when the climb is finished
* Re-establishing on-ground detection when the climb is finished
I can show you my result: It's at the 27:55 mark of this video:
https://www.youtube.com/watch?v=AGAYfjXuDLA&feature=youtu.be&t=1673&ab_channel=rlwAs far as how it is implemented--that could be a whole video in of itself. I'll mention that I found using actors more reliable than collision regions--not to mention, easier to manipulate and view in the scene editor. In my game, the ledges are represented by the green, turned arrows. These actors have a special behavior (Ledge) that just holds some data: which side the player can grab; is it a one-way platform; etc. They are also set to go invisible 'on created', so that I can see them in the scene editor, but not in the game. Moving platforms (like in the video I linked) also have this behavior.
Most of the action takes place in the 'ledge grab' behavior that the player actor has. It's not a simple behavior because it has to handle all of those cases I just listed.
Ledgegrab is actually the simpler of the two problems. Climbing is harder. For ledgegrab, I store the coordinates of the player's hands. When a collision with the ledge actor is detected--and the player is moving into the ledge (holding right or left button as appropriate)--then the actor gravity is disabled and her coordinates set to the (x,y) of the ledge, + (x,y) hand offset. A moving platform will need to adjust the player coordinates every tick as the platform itself moves. Whenever the player lets go, gravity is re-enabled.
The simplest solution might be to look at one of the resource kits available. TheIndieStation has a resource kit with a grab mechanic, but I think it is paid. I don't remember if Luyren has this behavior available in a resource kit, but it's worth looking.