Advice on increasing paths

Hi, Ive been using A*Pathfinding for 6 months now and have achieved my initial objectives with it.

However I have issues with using the patrol system whereby the character can not avoid trees and gets stuck behind them & doesn’t resolve to find a route around.

Im assuming I need to increase the number of possible routes but can’t work out from videos and trial and error how to do this and enable the character to have more path options.

I also can’t see the paths except immediately after the scan in Gismos. See attached below.

Any help on increasing paths and viewing them in gismos would be gratefully received, thanks.

Ive fixed being able to see the paths, but my question still remains how to increase paths to help patrol character avoid getting stuck behind trees (if that is the solution to avoiding getting stuck).

…plus being able to cross a narrow path.

Hi

Would you mind posting a screenshot of your graph near those trees, preferably when an agent is stuck there?

Hi Aron, Ive been testing different settings and now have the character just jumps a bit into the air instead of getting stuck at a tree. Still not what I want of course. Unfortunately the gismos aren’t showing the tile my character is currently in, in runtime for some reason so I can’t see to view the paths.

Is there any way I can just increase the amount of paths to provide better options around trees? (maybe along with reducing the walkable climb as well) ?

Hi

Not sure what you mean, in your screenshot I can see the navmesh for all tiles clearly in the gizmos. Some of them seem to be slightly below the terrain so they are a bit faded, but otherwise they are visible.

I’m not sure what you mean by this. Could you clarify?

Yes I see them but they are below, so they aren’t shown around the trees

The blue lines, Im not sure what you call them, but I think they are part of the process of calculating a path for the character to then follow. If I could increase these (do I reduce cell size to increase voxels depth/width ?) I am asking if this would provide more path options for a character using patrol, so that the character could traverse a more narrow path, and possibly also, find many alternatives around blockages such as trees.

I’ve been able to work out how to see the outlines and connections and see they appear to climb up the trees. So Im wondering if I have misunderstood Walkable Height and Climb Height.

Ive also improved the path options by reducing the Max Border Length to 5 which seems to help crossing narrow paths / bridges.


So by resetting the Walkable Height to 5 and the Walkable Climb to 4.99 there are less connections and outlines shown in the trees which Im wondering if it might make a difference.

See adjusted settings image below.

I shall test it now. If the character still jumps when it hits the trees I think for now I will just go back to removing the colliders so the character walks through like a ghost which is the way Ive resolved the conflict in the past.

Question: my island terrain obviously starts at sea level and rises. Does Walkable Climb and/or Walkable Height settings impact on how high the character in patrol mode can walk up this terrain? will one of these stop the character walking the most steep inclines and / or a height above sea level? I don’t fully understand these settings from the descriptions.

thanks

Hi

Walkable Height is essentially the character height’s. So about 2 meters for normal humans.
Walkable Climb is how high the character can climb upwards in a single step. A reasonable value for a normal human is maybe 0.4 meters.

You can attach the RecastMeshObj component to your trees and configure it to make the surface unwalkable. That will make sure you don’t get a navmesh up in the leaves.

I want to add another image as it is a much clearer image of how my current settings seem to aim for each tree, and some of the connections do a small jump up the side of the trunk.

Thank you. I will work on that advice Aron.

I’d also recommend reducing the max slope angle to something smaller. Right now the agent thinks it can walk up 90 degree slopes, which is why it thinks it’s ok to step up on the trunk of the tree.