# How can I get a Point to project onto the Navigation Mesh?

I’m having trouble getting this point to project onto the navigation mesh. It appears to project below the navigation mesh by about 500 units or so. I do a trace to see where it’s hitting and it’s always below the navigation mesh. What’s even more confusing is I use this node all the time. Most of my other targets are projected to the nav mesh and I never have any trouble with them.

I’m not seeing how this is going wrong. What it appears is that the look at rotation sometimes (or most often) is not perfectly orthogonal to the normal world axis which is understandable, but shouldn’t the "project point to Navigation node then slap it directly onto the nav mesh and the Vector I’m storing this in hold that location? Instead what happens is the first projection works fine, maybe a second or third, but eventually the location finds itself either below the nav mesh or above it. I’ve tried moving this project point node all the way to right in front of the move to location and also right in front of where I check to see if it’s within 100 units. I don’t want to open the distance check up anymore. Every other point I use project to the nav mesh fine.

How does the project point onto nav mesh work? Why is this projecting a point not on the nav mesh? Does it matter that I’m deriving a point from rotation and such if the point is going to be modified to rest on the nav mesh?

Here’s a shot of it in game. The numbers indicate the distance from the two points being compared (The Pawn’s location and the move to target). The traces you can see in the background all connect or at least com close to the ground. You can see how it’s elevated in the back where the sphere capsule is red because it’s projecting from the pawn’s location (it’s center), to the target which is supposed to be a point projected onto the nav mesh. As you can see all of the projections were okay except the last one where the point clearly sits up in the air. 215 units higher than the AI.

Here I bypass the vector math and just use a Get Random Point in Radius and plug it directly into the same “Project Point to Navigation” and it works fine. How is this feeding it an appropriate vector and the other way is not? Shouldn’t any vector work?

How about a work around? How would one go about getting the ai to look at a target to establish the direction and then pick a random point (but not in a radius) in a rectangle? Also this point should sit on the nav mesh for cleanliness.

This was never resolved and I think it’s important. To me the functionality of the “project point onto navigation” should cancel out any crazy improper rotations and point cast it onto the mesh - this should then be my new point.

Did you ever find answer to this question? I am having the same issue now. Projected point’s Z is always below the line trace’s Z.

Not yet, though I haven’t looked into it in awhile