How do i make my character lean against a wall?

I have a couple of questions regarding this:

How do i make my character lean on the wall and off the wall with a press of a button like you would in a stealth game?

What action makes my character stick to a surface in the Blueprints editor?

What i want to specifically achieve is an action where the player moves leans up against a wall with the press of a button which will change his pose into a leaning type of pose like you see in a stealth game where the character is leaning against the wall.

If you’ve played Splinter Cell and Metal Gear Solid you’ll know what i mean. If not then this video should show you what i want to achieve:

https://www.youtube.com/watch?v=I6p4cnnqvA4

Skip to 8:23 in the video and notice how the player leans against the wall by pressing a button, how do i replicate this in UE4?

Well you have to detect somehow where walls are. This can be rather tricky.

Your easiest way would be doing this via the levelblueprint and box volumes at every wall where you want to lean against.

You could also do something like actors as wall with a volume and your character can check if one of those is nearby.

There are no functions to stick to a wall, or to get where the next wall is or anything like that. You’ll have to figure a way out to do either.

I used corner denotations and raycasts to define the walls. Check out it [here][1].

[1]: