"negative" perch radius threshold to keep capsule contained?

So, inside the Character Movement Component, you can prevent the player from walking off ledges in certain circumstances.

The problem is, even though “Perch radius threshold” adjusts how far past the edge the capsule can move before it counts as “off the edge”, there doesn’t seem to be a way to prevent the capsule itself from getting too CLOSE.

i.e. If the character is not allowed to walk off a ledge, I’d like to prevent the horizontal bounds of his capsule from making it past the edge. I don’t want him to be able to walk out off the edge to the very bottom of his capsule; I don’t want ANY of his capsule from extending off the edge while he’s grounded.

I don’t want to use blocking volumes at the ledge for this (though they would work perfectly) since the player is only restricted in this way under certain circumstances (specifically, while being driven by root motion).

Any ideas?

I have no idea of what you can do to solve your trouble but at least, you can set collision to your blocking volumes from overlap to block and reverse when circumstances change and can deal with.

I considered this, but the problem is just that from a level design perspective it means every single edge in the game will need a blocking volume. That will get unwieldy quickly, and it seems like there ought to be a better way of doing this for a capsule with a known location and horizontal extent.

I’m hoping you already solved the issue, but I just came across this question and thought of an answer for anyone else with the same issue.

You can do a line trace from the front of your capsule (whatever the radius is) to just below the floor strait down. Have it trace whenever the player is in motion and if the trace does not recieve a blocking hit you can stop the players forward movement. Hope this helps