Last night I decided to put some of the cool new physics-based weapons in something resembling a real game level, so I brought
up the editor and dropped some throwing knives and an axe into the level, saved it, then ran it through the game engine.
The good news is that the weapons worked very well. The bad news is that the AI pathing stopped working for some reason,
although it had been working on that level before. I ran through another test level, and the pathing was working, so I loaded up the working level, then saved it in the editor, then ran it through the game. Now this one was broken also.
So, working on the physics somehow screwed up the paths. Turned out it was the fact that some things in the editor considered
their origin to be at the bottom of a mesh or entity. This is convenient for placing things on their feet. Of course, this origin is not ideal for, say, the center of mass of a physics system. So, it was just a mismatch between differing origin standards. Once I sorted that out this morning, the path started working again on the Temple of Arkhana level. Here is a shot of a path successfully being found over the bridge, but not into the water.
Another section of the level showed the fountain, which has a ramp up, which is the only way up into the fountain, but the
path system was treating the whole thing as connected. Of course, this was due to the symmetrical paths hacks I put in last week or so, where for some reason going a->b and then going b->a was not working, even on flat ground. As a hack, I made all paths symmetrical, but this caused a problem with the fountain, where you could drop down off the fountain successfully from anywhere, but could only get back up from the ramp. So, I decided to go back, with fresh eyes, and fix this once and for all.
It turns out it was a fairly easy fix. I had overloaded the idea of NavigationNode.mID == 0xfffff to mean an invalid node. This is fine for neighbor checks, but it created a bug whereby I was finding the valid node, but its id was still 0xffff b/c it was still invalid, thus about half of the links where being marked as invalid inadvertently. So, I fix this bug, and also added a separate valid field instead. So, now asymmetrical links are working. The code still needs some tweaks, as I am finding valid links that should not be marked as such, but its much closer now.
Here is a shot of the enemy approaching the player, and a physics-based boulder in the background.