As the title states, recast terrain subdivisions are really quite large.
Is there any way to set it to use smaller subdivisions when scanning terrain?
As the title states, recast terrain subdivisions are really quite large.
Is there any way to set it to use smaller subdivisions when scanning terrain?
Hi
You can enable tiling on the recast graph to split it up into smaller subdivisions.
You can also experiment with the max edge length parameter (even though the effect of that is limited).
Yeah I use tiles of size 128 any way since our zones are 2km x 2km or larger.
Any attempts to change the max edge length have never given an expected result either… that param just seems to make a lot more long skinny polygons rather than breaking the mesh up nicely.
So no other options?
Erm… Reduce the tile size?
I would suggest that you don’t go too much below 64 though (tiles have some overhead).
If you reduce it too much it will essentially become a grid graph.
For what purpose do you want very small subdivisions?
It’s just that some of the terrain - due to the way it undulates - ends up having nav mesh triangles that are significantly lower than the terrain itself… 3-5m in some cases, so even though I am raycasting down to keep NPCs flush on the terrain, sometimes they pop underneath it. I don’t want to be raycasting too far either, or I will have cases where an NPC might pop up onto low hanging collision.
Have you considered adding in a height mesh similar to what Unity’s nav mesh solution does?
Hi
Generally the movement scripts should not use the height information of the navmesh that much. All the built in movement scripts use raycasting for that. Are you using the built in movement scripts?
I’m not using the built in movement scripts, I’m just using the raw path information.
Maybe the best option is to just move toward the next path node ignoring height, and just constantly snap to the ground via raycasts?
Yes, that is what the included movement scripts do. They mostly use the XZ information and treat the Y coordinate as a very fuzzy estimate of where the ground is.
Colliders in the world are generally a lot more detailed, so why not use them.