Godot Version
4.3.stable
Question
I’m running into an issue that’s doing my head in a bit. I’ve made a city environment with sidewalks that have a multiple convex collision shape on the mesh. My player is a capsule shape and is able to go from the street level to the sidewalk no problem (The mob follows the player). However, the mob, which has the exactly same capsule shape and parameters as the player, gets stuck on the ledge.
If I raise the collision body, then he follows but of course clips through the ground. The mob is using a _process() function and I tried changing it to _physics_process() but that also didn’t work. I thought maybe it was the bones collision bodies from the mob, but also deleting those and trying still doesn’t work.
What’s your navigation setup? Are you using a navigationmesh? What does the navigationmesh look like on the sidewalk?
You may need to adjust this property: NavigationMesh — Godot Engine (stable) documentation in English
I think this may be a navigation issue rather then a collision issue. You gave the mob the sama parameters as the player, but have you tried fiddling with the floor settings you are showing in your screenshot?
I’ve also come to the conclusion it also might be something with the navigationmesh, but after trying to adjust some things myself (not with the greatest insight) also hasn’t work so far. I’ve tried making the variables quite extreme like with the max slope and max climb, but it still doesn’t work.
I have also fiddled with the floor settings in both the player and mob. The player changes work (eg: max angle 90 for wall climbing).
The only way I can get the navigation mesh to split between the road and the sidewalk height is to make the max climb less than 0.25m
Is your navigation mesh automatically baked? You may need to do manual editing of the navigation mesh. I don’t see the slope between the road and the sidewalk, so the max slope setting won’t do anything here.
So it looks like your navigationmesh causes the mob to get stuck on the curb due to there being a lack of height difference between the road and the sidewalk.
Your last screenshot looks better but now there’s no slope from the road to the sidewalk. Is there no setting in your navigationmesh that will generate the slope too?
It is automatically baked. I’ll read up on trying to manually edit it. I added a screenshot of the collisionmesh for the street, maybe it can help make some sense of it.
From what I’ve been trying, I can’t seem to get anyway for there to be a slope between the two.