A* Pathfinding Project

Navmesh cutting not working on XY



I’ve been trying to cut a XY oriented navmesh following the Navmesh Cutting tutorial and the 2D Pathfinding tutorial

I set up a cutter to test the functionality following the tutorials.

If Rotation and scale is selected, it ignores the cut. When I deselect it, all the navmeshgraph disappears and my character is unable to move.

If I comment the following lines from TileHandler.cs (since that warning was being displayed a lot), it starts hidding all the rectangles that the cutter intersects with.

if (VectorMath.IsColinearXZ(tp1, tp2, tp3)) {
        Debug.LogWarning("Skipping degenerate triangle.");

What am I doing wrong?

Thanks in advance.



Is anyone also struggling with this?



For a navmesh graph you need to explicitly rotate the mesh in the A* Inspector. I.e. it needs to look something like this:

This is because otherwise the system will still think that Y+ is the up direction.


I cannot rotate the navmesh since we are using it on the XY (Vertical) axis, and rotating it would make the navmesh perpendicular to the world and the pathfinding wouldn’t work anymore.



I mean that you will have to rotate it in your 3D modelling program so that you then can set the rotation in the graph settings to (90, 0, 0).


I’ll give it a try and report the results.
Thank you very much.


Thank you so much, it worked!