Character Collision Overhang

Hi Guys, Im having some problems with my characters collision. Its a similar issue I’d face with a collision cylinder as well so I thought I would ask for some insight. Currently the player over hangs ledges quite dramatically to the point it floats on the collision capsule, this same issue happens less dramatically on a collision cylinder. Im wondering how I can solve it so that when a player steps over the ledge they begin falling in a more realistic manner.

This is an issue with most game engines, I supposed you can try running a trace or check how far off the ledge they are and either, force them to fall by shortening the collision Capsule/Cylinder or turning off collision for a second so they fall. Or maybe a force impulse as if they slid off the edge.

Hope this helps.

Yeah thats where I was heading, just nudging them slowly and doing some custom foot placement as they get closer to an edge. Im just surprised we still find this kind of thing acceptable in games, Im just curious as to why its seemingly so complex. Trying to find information on techniques people have used in the past to counter this seems to be a bust as well so I’ll just try tracing for ledges. I’ll let you know what I come up with, its certainly not going to be pretty.

It probably wont, What I do for my Game in UE3, is make them play a ledge scare anim. So it Hides the effect haha. Might look goofy on a more serious game though.

There is a setting on the CharacterMovementComponent that can be used to prevent this: PerchRadiusThreshold. By default it is set to zero, but if non-zero, it indicates the distance from the edge of the capsule where we are not allowed to perch on the edge of a surface. For example, if you have a capsule radius of 40 and a threshold of 10, you can effectively only stand on the edge within the radius of 30 (those outer 10 units are invalid for perching).

Note that we still allow you to stand on that outside edge if within MaxStepHeight of a walkable floor below, because otherwise you would often be unable to climb up stairs.

Ahh thanks for the reply. What you suggested does seem to work to some degree, I will have to do some footplacement and messing around still but this certainly gets me alot closer to what Im trying to accomplish :slight_smile: