Offset ledge detection / character floating

hello, i was trying to play with the values concerning the walk off ledge parameter ( in the default 3rd person character ). i’ve managed to make it somewhat work but i would like to make it so the ledge is detected way before you get there. As you can see in the picture this is what i am aiming for.

putting up invisible wall is not really a solution since the landscape is huge and has many cliffs.

thanks for your time !

2 Likes

Unfortunately you cannot do this with the default character. This is simply not how it’s implemented. The ledge check is based on the capsule radius so the earliest you can stop is when the center of the capsule reaches the ledge by setting “Perch Radius Threshold” equal to the capsule radius. You would have to implement this functionality yourself.

2 Likes

OK so do a line trace ahead of playertoward the ground to check if the floor is there. If its not do another longer line trace straight down at the location the floor should have been. Use this to confirm its not just a slope. Then line trace back toward the player lower than the current floor to find the cliff edge. Next either spawn a blocking volume or use logic to stop movement in that direction. My gav logic is doing an in range check before applying movement that way your asking if I move will that move put me in range of this location. If not you can walk.
Hope this helps