Sounds like, the mechanic you are looking for is a Grappling Hook, or Spidermans Web Swing, or the famous Worms Ninja Rope (or for the newer ones Attack on Titans 3D maneuver gear).
Well, for the simpler versions without being able to wrap around objects/obstacles, there are a lot of tutorials on youtube.
https://www.youtube.com/results?search_query=unreal+engine+5+grappling+hook+tutorial
Like:
or:
https://www.youtube.com/results?search_query=unreal+engine+rope+swing+
Things get more difficult for a Worms Ninja rope, which can wrap around items.
2D, 2.5D or 3D would just be a matter of restricting the movement of your char, for the rope or grappling hook mechanic itself should not make a difference.