Questions before buying

Hi! I have a couple of questions before I buy the asset, I’ve read through the docs but some things are a little unclear still:

1: A: Is it possible to get the current navmesh link object once the agent has entered one, I need this for custom link traversal on ladders. Right now with the Unity navmesh there officially cant be more than one agent using a link - so what I do is I just remove the agent from the link and move him through script.
B: Can I move or disable/reenable links

2: I have ~100 bots on medium sized maps (think battlefield games) - which graph type do you recommend and why?

3: For spawning and sometimes moving, I need to be able to select a random point on the graph inside a radius that is not inside of an object, the Unity navmesh baker bakes navmesh even inside colliders like thick walls. Is it possible to not bake graphs inside of objects/is it possible to get a point thats not inside of one.

4: I have mod support planned, if modders want to create their own maps - how would they go about creating a graph themselves without owning the asset? I know I can generate graphs at runtime, do I need to make it an in-game only map editor or is there another way to generate them in the editor as a modder?

5: Is local avoidance something you would recommend for 100 bots at once?

6: When I create multiple graphs at once, eg. one for humans, another for vehicles - and these graphs only differ in terms of how big an agent is, are there any optimizations I could do to maybe only have one graph?

Thank you :slight_smile:

Hi

Sorry for the late answer.

  1. For the RichAI movement script (the movement script with the best support for off mesh links currently) you can register to a callback (RichAI.onTraverseOffMeshLink) so you can implement exactly what happens when a link is traversed. There is no restriction on the number of agents that can traverse a link.

  2. Probably a recast graph.

  3. In the beta version colliders are treated as solid as default and you will get no navmesh generated inside them.

  4. If they need to generate a navmesh they need to either own the asset or generate the navmesh in your game.

  5. 100 bots is no problem for local avoidance. However, for a fast paced shooting game this type of local avoidance might not be optimal (and in the beta the performance is even higher). It is more optimized for slightly slower moving crowds.

  6. For the grid graph one can do one such optimization (see https://arongranberg.com/astar/docs/multipleagenttypes.html), however two recast graphs will probably use significantly less memory than a single grid graph anyway.

The beta version is usually more robust than the non-beta version :stuck_out_tongue:
The big changes are that it depends on the Unity burst, collections and jobs packages, which some people seem to not like.

In the beta version colliders are treated as solid as default and you will get no navmesh generated inside them.

I’m using the latest beta version (4.3.39) and when I generate a Recast Graph it still generates it inside colliders. I have rasterize colliders enabled. Am I doing something wrong?

Oh, one thing I forgot to mention about that. That feature is only supporeted in the burst rewrite of the recast graph, which depends on some things in Unity 2020. Do you have Unity 2020?

Yes, Unity 2020.1.16f1

Do you have a screenshot of your graph and settings?

Ah, you are using a non-convex mesh collider I’m guessing?

If you are: non-convex mesh colliders have a very weak definition of “inside”. They don’t necessarily have an inside (this requires a watertight mesh), and validating this is pretty tricky. You can add a RecastMeshObj component to the object with the mesh collider and set its ‘solid’ field to true. That will make the package perform a best guess of what the inside is.

Both options worked perfectly, thank you very much!
Are there any downsides to pretty much putting the RecastMeshObj component on every object using a mesh collider?

1 Like

Nice!

Are there any downsides to pretty much putting the RecastMeshObj component on every object using a mesh collider?

The downside is that it may not detect the “correct” inside of the object. Internally it checks for the lowest and highest y coordinate of the mesh in each XZ cell when it voxelizes the world, and then ensures there is no navmesh in that range.

It also has a performance cost, but it’s pretty minor.

Is that a constant performance cost or does it just make generating the navmesh slower?

It only costs when generating the navmesh.

Awesome! Thank you so much for the support, this feature was so important for my game and I seriously don’t know what I’d have done without it!

1 Like