- Home /
NavMesh pathfinding on parallel grounds/platforms
Hi! I'm working on a 2D sidescroller project and I'm dealing with some NavMesh issues. This will help me explain it with little effort:
I've set up correctly all the areas that must generate the pathfinding navmesh for all AI agents, but when I put a "dropable" platform, the Navigation system avoids the ground and sets the platform as the only walkable section for the pedestrians. When playing, it gets ridiculous since the player walks on the ground and the AI jumps to the platform looking for the shortest path.
Is there any way to solve that and make both objects walkable for the pathfinding?
Thanks!
Could it be the height setting (in bake settings)? Somehow looks like the ball doesn't quite fit under the bridge. Just an idea.
Thanks for your reply, Gerry$$anonymous$$. No, the ball has enough room, it's just a matter of perspective. I've checked this out: the height of the platform is less than the "drop distance" value in the bake settings.
But this brings me another problem. If I rise up the platform or make the "drop distance" value higher, then Unity does not generate Off$$anonymous$$esh Links in that platform. But I'm sure going to have parallel platforms in my game so what's the point? I need the enemy to hang from ledges and climb them, but I also need him to chase the player when he's under a platform. I've tried setting the platform sections to a "harder to navigate" value, but the baking result is the same.
$$anonymous$$aybe I should just put there custom Off$$anonymous$$esh Links and forget about auto ones?
Seems like there are two issues. According to the screenshot, the area under your platform is not marked accessible. As it seems to be just a continuation of your main path the only explanation I see is the height value in general bake settings. Lowering that value should at least mark the are blue. If it doesn't there is a serious issue with navigation. This shouldn't be affected by Off$$anonymous$$esh Links.
The second issue is your Off$$anonymous$$esh Link. I doubt that manual ones would make a difference here (apart from individual cost settings).
Anyhow, good luck!
Your answer
Follow this Question
Related Questions
NavMesh that envelops a sphere 0 Answers
walking through the countryside ? 1 Answer
Navmesh with destructible obstacles 1 Answer
How to sample a point on a navMesh Agent path 0 Answers
Is it possible to change the size and position of a NavMesh 0 Answers