How to create some sort of edge compensation when a player (capsule) is standing on an edge

Hello

Currently in ammo when a capsule collision entity stands on a edge it falls off automatically when half of its diameter leaves the edge. I want to make it so the capsule only falls when its entire diameter leaves the edge. Is this possible to achieve without a raycast? Maybe setting some sort of a box collision entity or something underneath the player? But I can’t figure out the logic. I would appreciate any guidance :slight_smile:

What I want to achieve (the right picture):

1

Thanks!