Consistent landing on edges with capsule collision

I’m creating a 3D-platformer game and came across this problem. When my Character is jumping and hits an edge of a platform he slides a little on it and then drops down. This is (I think) due to the Capsule Collision. When he lands on the spot where the capsule has its slope he slides weirdly. So I’m wondering how this issue is solved properly. I though of a linetrace to detect edges and then lerp the position onto the platform when close enough, like a little assist for the player. But this is not working that well. When jumping straight onto it its fine but not working consistent. Also when I choose a boxtrace instead of a line its still weird. Therefore I though using a Box Collision should solve the problem since then you can’t land on an edge. Either you hit the landing or you don’t. But this is hard to realize since the default is a Capsule and this is very well needed for walking on stairs / slopes. So I though I could change it while in air. But this still does not work. I’m running out of ideas so I would like to hear if someone had a similar problem. It seems that this should be fairly easy with the right trick.

Hope the video shows my problem. :slight_smile:

1 Like

Problem solved. It was actually not a problem of the Capsule but of the movement component. I had a quiet big Perch Radius Threshold. This caused this sliding. If you set this to zero than one automatically lands when there is ground under some point of the capsules cross section. So the slope of the capsule does not matter. I set the value to something smaller so that it works fine for me :slight_smile:


Reanimating necro post just to say that yes, setting perch radius to 0 solves this issue, but can introduce another where the character can perch in the air when walking to the edge of platforms. My solution was to set perch radius based on is falling/jumping.