Weird problem with Project Point to Navigation

I’m experiencing a really weird problem. I’m working on a navigation hint system where the player can get a hint about where they need to go. This relies on a destination actor in the level that marks where they are headed. I developed the feature in a dedicated test map, and it works great there. No problems at all. Once I move it over to one of the actual game maps, it completely stops working because the Project Point to Navigation node always returns [FONT=Courier New](0, 0, 0) for that actor’s location.

I’ve been stepping through the engine code behind that node and I think I’ve found where the problem happens, but I’m still not sure why it happens or how to fix it.

In [FONT=Courier New]FPImplRecastNavMesh::ProjectPointToNavMesh()(from [FONT=Courier New]PImplRecastNavMesh.cpp), it starts with an [FONT=Courier New]Extents value of [FONT=Courier New](50, 50, 20). It calls [FONT=Courier New]NavMeshOwner->GetModifiedQueryExtent(Extent), and the returned value is [FONT=Courier New](0, 0, 250), which it then uses to search the navmesh tiles looking for overlapping geometry. WIth any dimension of an extents set to 0, there’s never going to be any overlapping geometry.

I’m pretty much out of ideas about how to fix this. I’ve replaced the object with a new one, tried moving it to new locations, made sure there’s a clear navigation path, checked collision settings on the floor and the destination marker, tried moving the destination point around in all three dimensions. Everything looks right, but I always get [FONT=Courier New](0, 0, 0) back no matter what I do.

If anyone has any thoughts about what might be going on, I’d really appreciate it because I’m pulling out my hair on this.

Thanks!
Jeff

Figured I’d just update this since I found a solution, of sorts.

I created a new map and copied over chunks of the old map at a time, testing the navigation code after each chunk. Copying the map contents to a new level was a pain, but it has fixed the issue.

I still have no idea what was causing the problem, but if you get into a map where navmesh functionality isn’t working as expected, try creating a new empty level and copying the contents of the problematic map over to it.

I think I’m having the same problem. If I hadn’t found this post, I probably would have wasted a lot more time trying to figure out what I’m doing wrong, so thank you for that update.

I think your Navigation didn’t get built/baked maybe. I had issues with stuff going to 0,0,0 before with the navigation system and rebuilding it seemed to have helped me before. Just my 2 cents.

build_navigation