News › Forums › RAIN › General Discussion and Troubleshooting › Can multiple NavMeshes work as one?
This topic contains 7 replies, has 4 voices, and was last updated by redhawk 2 years, 9 months ago.
January 23, 2023 at 3:14 pm #6597
Hi, I am using the new RAIN and I just had a quick question.
When I tried creating a single NavMesh over my map, I waited about 15 minutes to no avail. My map is just a plane extruded using Blender; I believe its scale is about 2500 Unity units across. So, I decided to try generating a smaller NavMesh that only occupied about 1/8th of the map, and it was generated fine in only a minute or so.
My question is can I create multiple NavMeshes over my map and utilize them as if they were one NavMesh? Will there be any interference when WayPoints cross the NavMeshes?
I followed this tutorial for the creation of my map. It’s generally the same idea.
January 23, 2023 at 5:36 pm #6598
Same issue, same questionJanuary 23, 2023 at 8:39 pm #6608
I was thinking of trying it when I get home tonight (California), but that won’t be for a few hours. It’s currently 12:30p. I noticed someone else had asked this question about a month or two ago but was never answered, and something is telling me that RAIN doesn’t inherently allow crossing over between 2 or more NavMeshes. I’m just curious if it will work and what I could do to make it work.January 24, 2023 at 3:32 am #6613
I managed to try a simple test. I essentially put in a second NavMesh and extended the WayPoint Route into the new NavMesh’s territory. The two NavMeshes overlap each other a little.
When I ran this, the simple AI Character, which did absolutely nothing but follow the WayPoint Route, did not cross onto the new NavMesh but stopped on the last WayPoint Node within the original NavMesh.
I will resume further testing. ;>January 24, 2023 at 4:18 am #6615
Hmm. Well, I couldn’t get 2 NavMeshes working together using only simple techniques. However, I tried creating one large NavMesh again, this time shrinking the Height of the Box to cover only the ground (originally, I had left it large). Also, I kept the default “Size” to 20 and scaled it from there. This time, a NavMesh was successfully created and the WayPoints worked like a charm.
I would still like to know a solution for joining 2 NavMeshes together, though.January 25, 2023 at 10:59 pm #6630
No, RAIN doesn’t currently have a way of stitching together NavMeshes. One trick you can use is to overlap the meshes and use a waypoint network when pathing from one to the other. For the waypoint network, just place a waypoint in the overlap region. RAIN will path to the waypoint in the overlap, then switch meshes. Avoid using the waypoint network when not going across navmeshes to ensure it doesn’t interfere with normal pathing.January 25, 2023 at 11:27 pm #6633
Ok, cool! I may give that a try later, but I actually got my map to work with only one NavMesh by shortening the height of the generation box to only include the ground and not any surfaces on top of the walls.
Thanks for the reply. ;>January 26, 2023 at 1:37 am #6635
I’d like to see an example of this Prime. If you could create maybe 4 navmeshes and use the technique you state as an example for everyone, I would appreciate it. They don’t have to be large meshes.
You must be logged in to reply to this topic.