Linecast on a rotated Navmesh

Hello!

I’m trying to check if a straight line is possible within my navmesh. When I call the Linecast function it always returns true, it doesn’t matter where the two points are.

Linecast returns true.

Linecast returns true.

My navmesh is rotated 90 degrees on the X-axis as suggested by Aron in this post:

Does that rotation affect the Linecast?

What am I doing wrong?

Thanks in advance.

OK, checking “recalculate normals” seems to fix it.

Some of our scenes seem to work without it. I’ve tried using the “working” mesh on a “not working” scene and doesn’t work either without checking this.

1 Like