Navmesh cutting not working on XY

Hello,

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.");
	continue;
}

What am I doing wrong?

Thanks in advance.

Julen.

Is anyone also struggling with this?

Hi

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

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

Hello,
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.

Hi

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).

1 Like

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

Thank you so much, it worked!

1 Like