News › Forums › RAIN › General Discussion and Troubleshooting › Pathfinding on uneven terrain
Tagged: pathfinding
This topic contains 9 replies, has 3 voices, and was last updated by Jester 1 year ago.
-
AuthorPosts
-
January 8, 2023 at 5:15 pm #6210
I’ve worked through several tutorials with Rain and navmeshes work great when the ground is flat. I am working on a level that is an island and it has uneven terrain. Could someone give me some tips for pathfinding with Rain when working with hills or just non-flat terrain?
January 9, 2023 at 6:17 pm #6242What are the issues you are seeing? I do this fairly often without any issues. You just need to make sure you have your slopes and step up heights set correctly when generating the mesh.
January 10, 2023 at 2:00 am #6259I have adjusted those setting but it doesn’t seem to make a difference. In the first picture is the area covered by my navmesh and it encompases the slight hill near the ship.
Generating the Navmesh and the middle of it is under the terrain.
Disabling the terrain you can see the Navmesh is complete, it is just a bit under the highest points in the area.
Here are the setting I have for generation of the Navmesh.
Any insight would be appriciated.- This reply was modified 1 year, 6 months ago by RathonGerdack.
January 10, 2023 at 3:47 am #6266Does having the navmesh underneath the terrain have any impact on its usability? There are some tweaks that will bring it closer to the actual terrain, but it shouldn’t affect usage.
January 10, 2023 at 3:49 am #6267By the way - switch to advanced mode and you can raise the visualization for the terrain without disabling anything.
January 10, 2023 at 3:50 am #6268BTW 2 - your scene looks pretty nice. What’s the game?
January 10, 2023 at 4:05 am #6269There is a bit of a usage issue since the AI character doesn’t follow the terrain. Depending on the spot it is moving to it half in the ground or floating above it at some spots. It’s from a pirate game we’re working on called Skurvy.
January 10, 2023 at 1:43 pm #6275Y. Our navmesh isn’t really intended to be a replacement for the terrain itself - just a way to find a path. We usually use some other method to lock to the surface. Usually that’s gravity and terrain collisions. Sometimes it is raycasting.
January 10, 2023 at 1:57 pm #6276That makes sense. I just wasn’t sure if having the Navmesh under or above the terrain in spots would confuse the AI. I’ll keep the rigged character above the ground with colliders. Thanks for the help.
July 11, 2022 at 10:00 pm #31383How is development going?
I look forward to hearing from you.
Best,
Jester -
AuthorPosts
You must be logged in to reply to this topic.