I’m using the FirstPersonCharacter template to be able to run around my procedural created level.
Collision against the walls work fine, but not when getting to ledges of the terrain.
i played with various settings to no avail (it seems to get even worse and stick right to the ledge).
i hope you see what i mean in the youtube video: youtube link
the relevant settings can be seen here: imgur direct link
is it possible to fully solve this with the standard template?
if not, what are my options?
no, that’s not the issue.
“Can Walk Off Ledges” is disabled. i want the collission capsule to slide against the ledge like it does when pushing against the wall.
right now, trying different settings, it either gets completly stuck on the ledge till i turn 90° away from it, or it gets all bumpy…
here’s another video showing it a bit better https://youtu.be/0fYKFNOwee8
it’s like running against a jigsaw.
last seconds of the video shows a comparison of how it should slide against the ledge, like it does against the wall.
numerous different settings have been tried with no smooth experience.
this is with perch radius same as capsule radius:
still saw-ish sliding if at all.
the only thing i have not noticed before is, that this jagging sliding happens to the left side more often than on the right side (if that makes sense).
Can the value for the perch radius be more than the capsule size? Say, capsule radius x2 so that you “hit” the wall of the ledge?
Note that knowing how the character BP is made, I don’t think this will work, but it’s worth a try I think.
Otherwise you have to handle the ledge stop yourself. It’s easy enough. You just need to trace 1 capsule ahead for the floor, and prevent moving forward only by resetting the actor location to the same value on the correct axis.
It’ll take some experimenting, but I’m sure anyone can get it to work that way…
Yea, its because in c++ the trace happens at the center point of the sphel, so the control is only good up to that point and not before.
The proper way to address it would be to change the code in the character class so that fhe line trace for find floor happens at the edge of the capsule.
If you know enough coding its probably easier to do that. However it wont keep the issue from happening when you walk sideways.
To fix that, you have to change the trace location of find floor dynamically based on the direction of movement.