Creating An Auto-jump at Ledge System

I’ve been wanting to make a system where the player-character will autojump when it gets to a ledge, exactly like in 3D Legend of Zelda games.

To be honest, I have absolutely no idea how to go about this.
If anyone has any ideas, or actually knows how to, please feel free to share. Help is greatly appriciated!

There may be a more refined way of doing this, but if you place a Box Trigger at the end
of the ledges you can use this to make your character jump.

Send a line trace down from your character that checks for ground beneath the character. If your character walks off a ledge, add force in the positive z direction to send them upward. Experiment with the amount of force and precise position/length of the trace until it feels right.

Then you can also check the current velocity of the character when they start falling so you can make it so they only jump when moving forward and at a certain speed.