I have a 2D scene where the player is walking along an upper floor while an NPC moves along a lower floor. Originally, I used two NavMeshes that look like this:
_______
[______]
___________
[__________]
But when I started the scene, the NPC immediately walked through space up to the first floor in search of their marker. So then I tried building them as one NavMesh:
[ _____]
I I_________
[__________]
Both characters moved along their path almost properly, except that all the pathfinding is now calculated through that gap. If I take my player for a walk, they squeeze through regardless of collision boxes and holes. The best luck I've had is using a trigger box to force the player away from there, but the pathfinding keeps pulling them back.
Does anyone have an idea as to how to get two NavMeshes to work at once? Or at least fake it?
Thanks
Comments
Another solution would be figuring out how to make the NPC walk around without a NavMesh, so I'll dig into that a little today.
In the meantime, if the bottom area is the literal rectangle that your diagram suggests, you may be able to do without pathfinding for the NPC - the Character: Move to point Action has the ability to do without pathfinding, which will cause them to move in a straight line to their destination.