Sekiro has one base check that breaks off into to options when the player approaches a ledge…
The game will first check the height of the floor below the ledge, and then make a choice from one of the following
- The player (Sekiro) will apply movement as normal, allowing input to continue but never run off the ledge
- If the fall is not above a certain threshold, the character will run off as normal
It’s the highlighted section of that first part that has me stuck.
I am aware of bCanwalkoffledges, which isn’t the problem nor the solution. I already have an accurate input based line trace to find edges. I just need that last step.
for those that are curious about the ledge detection…
So after doing a bit more testing of it in game, I acts almost like a blocking volume is put there. Even if you fall to a lower ledge that is in a safe place, if you were to go off another edge in the process that would drop you to an unsafe place you will get blocked from falling.
It sounds like a found it, I cracked the code. But that thing is still WAY to precise .
If I was to walk along a jagged edged if follows it EXACTLY. that would mean I would have to put a blocking volume for EACH polygon…that’s insane…
So I came up with another approach I’m trying out.
For those who have played sekiro may know about a system where if the player is locked on to a target that is below them. When the player jumps in their direction, it will prevent the player from flying over them, smoothing them until they are right on top of them to do a deathblow without preventing forward input. As a matter of fact you could pull away in mid flight if you wanted to, since this isn’t a system that locks you to the motion like assassins creed, it’s more like a guide to the target.
My idea is to retro act that into this system using the trace I used above and then another from the players feet height toward their location to figure out the floor.
Now…I just have to figure how to do that in the first place…
Why is it always the simplest things that give me the most problems…