Child collider on player pawn

So, I’m building a game, and it currently all works mostly okay, but I discovered a slight issue. In the game, the character jumps between ledges, but the large capsule collider size meant that the character appeared to be standing on air at certain points. To counter this, I resized the collider to be very thin, which worked, but left me with another issue - when walking into walls, the character can sink into the wall, which looks very odd.

Now, there are more complex things at work here, but this is the general gist. In an attempt to find an over-arching solution, I tried attaching a child collider, at the original width, to the top half of the player, so that this could be used for walking into walls and things, while the slimmer collider could be used for ground collision, but for some reason, the child collider is being ignored entirely, regardless of the settings I use. Is there some specific way to set this up, or is it just not possible?

Hi Hoeloe,

There is a setting in the Defaults tab of your character blueprint called ‘Perch Radius Threshold’. Set this to a higher value, for example 500, and it will cause your character to slip off of the edge before allowing them to stand in the air.

Just make sure you set your capsule back to it’s default size.

TJ

Unfortunately, this won’t help. Our game mechanics require that we set the world position of the player directly, so no matter how high this value gets, its effect will be negated.

Well, another idea would be to perform a line trace to measure the distance a player is beyond a ledge. Then add a slight impulse to push the player off.

That is potentially a solution. Thanks.