Character climbing: how can I prevent wall sliding while keeping collision blocking?

Hi everyone,

I’m relatively new to programming and I’m currently learning Unreal Engine while developing my first-person climbing system.

This particular part of the system is proving to be quite advanced for my current level. I’m using AI as a learning and development aid, mainly to understand specific Blueprint nodes and possible approaches, but I’m still building and testing the system myself. I often ask for help understanding what individual nodes do and how they might fit together, but I’ve been unable to reach a solid and reliable solution for this specific problem.

At the moment, I’m stuck on the collision/movement behavior during climbing.

My character switches to Flying movement mode while climbing. I need the character capsule to keep World Static = Block so that the player cannot penetrate the wall.

The problem is that when the capsule is touching the wall and I move parallel to the surface, the CharacterMovementComponent keeps sliding along the wall indefinitely.

If I change the capsule collision response from Block to Overlap, the sliding problem goes away, but then the character can penetrate the wall and potentially fall through the geometry.

I’m currently using:

  • Set Movement Mode = Flying
  • Set Actor Location with Sweep = true
  • A custom climbing movement vector based on the wall’s Impact Normal

I’m mainly trying to understand the correct approach rather than simply finding a workaround. Since I’m still learning programming, I’d also appreciate an explanation of why the sliding happens and which part of the CharacterMovementComponent or collision system is responsible for this behavior.

Hello @brBlackFish ,Welcome to the forums
It’s great to see that you’re learning Unreal Engine on your own.

As a recommendation, AI can be a very useful tool for helping with specific things, such as understanding Blueprint nodes, answering particular questions, or providing support during development. However, if your goal is to truly learn, I wouldn’t recommend relying on it to build complete systems from scratch.

If I had to suggest an approach, I would recommend focusing primarily on the official documentation and videos that explain specific systems or mechanics. Try to understand how they work and why they are built that way, then attempt to recreate them on your own. In my opinion, that’s one of the best ways to learn because it forces you to understand the logic behind the implementation rather than simply copying a solution.

Unreal Engine is also a very large ecosystem, and it can feel overwhelming at first. That’s why I think progressing step by step, studying existing systems, and then replicating them yourself will give you a much stronger foundation in the long run.

Now, regarding your climbing system, I think the issue might be that you’re missing a value for Braking Deceleration Flying in your BP_FirstPersonCharacter.

I would recommend setting it to a value higher than 1000 so it works properly. This parameter controls how quickly the character decelerates while using the Flying movement mode, and if it’s too low, it can cause the character to keep sliding.

Something that’s great about Unreal Engine, and game development in general, is that there isn’t a single “correct” way to do things. Most problems can be solved in different ways, and many times several different approaches can lead to exactly the same result. Some solutions may be more efficient, easier to maintain, or more scalable than others, but that doesn’t mean the others are wrong.

Because of that, when you’re learning, try not to get obsessed with finding the perfect solution. It’s very common that, for example, two people solve the same problem in completely different ways and both solutions work correctly.

I’m also leaving you a climbing system so you can compare it with yours. It might help you identify something you’re missing, or simply show you different approaches and possible improvements for your own system.

First, create an Input Action. In this case, I called it IA_Climb


Then add it to your Input Mapping Context with a Pressed trigger.

First of all, we’re going to create a Line Trace to detect where the player is looking and determine whether they can start climbing.

From the Return Value of the Line Trace, create a Branch. If the character is colliding with a valid climbable surface (in this case, a wall), create a bool variable called bIsClimbing and set it to true.

Next, set the Movement Mode to Flying, as you mentioned. Then, from the Character Movement Component, disable Orient Rotation to Movement so the character continues facing the wall instead of rotating toward the movement direction.

After that, use the Normal from the Break Hit Result and create a Make Rotator From X node. From this rotator, we’re going to use its Z value (Yaw), since this is what will allow us to correctly orient the character toward the wall.

Then, get the character’s current rotation using Get Actor Rotation and keep its X (Roll) and Y (Pitch) values. Finally, combine those values with the Z (Yaw) obtained from Make Rotator From X and connect the result to a Set Actor Rotation node.

This way, the character will always be forced to face the wall while climbing, while preserving the other rotation values and preventing unwanted rotations during movement.

If we’re climbing bIsClimbing = true , we’re going to reuse the same logic we created earlier inside the Event Tick. We’ll use this so it updates every frame instead of running only once.

If this logic were executed only when climbing starts, the character’s rotation would not update as the wall changes direction or angle. By running it in the Event Tick, we ensure that the character continues facing the wall correctly throughout the entire climbing process.

Now we’re going to modify the Move function so that it behaves differently when the character is climbing.

For horizontal movement (Left / Right), we don’t modify anything, since it already works correctly for both normal movement and climbing.

For vertical movement (Forward / Backward), we check the bIsClimbing variable using a Branch.

If bIsClimbing is false, we use the character’s normal movement logic.

If bIsClimbing is true, instead of using the Forward Vector, we obtain the Control Rotation and create a Get Up Vector using only its Yaw value. This gives us a vertical direction relative to the wall the character is attached to.

The output of the Get Up Vector is then connected to the World Direction input of the Add Movement Input node, allowing the character to move up and down the wall while climbing.

Finally, we’re going to create a Custom Event to stop climbing.

Inside this event, we set the bIsClimbing variable to false and change the Movement Mode back to Falling instead of Walking. This is because when the character stops climbing, there may not always be a surface beneath them. If we switched directly to Walking, we could get unnatural behavior when detaching from the wall. By using Falling, we allow the CharacterMovementComponent to automatically determine whether the character should fall or return to the walking state once it detects a valid surface below.

We also re-enable Orient Rotation to Movement to restore the character’s normal behavior and allow it to rotate according to its movement direction again.

We call this event from the Branch in the Event Tick. In this case, it will be executed when the player stops looking at the wall.

We can also call it from IA_Climb, allowing the player to stop climbing by pressing the climb key again.

With this, you should have a climbing system working correctly.

And if you have any other questions, you can ask on the forum, and I’m sure someone will be able to help you.

Hope it helps!