by socialist_coder · 5y ago · 0 comments
Maybe this is obvious but I'm not seeing it... Why would an NPC measure distance in triangles instead of meters? Why is it trying to get 100 triangles away?
So you give the NPC a speed, and it moves as far along the edges between vertexes in each time interval.
The navmesh also helps keep the AI traveling in places that have been marked as safe for travel, without collision or drops.
In the low-density mesh which the fox uses, there are more nodes around treasure, and because edges connect nodes, more of the edges in uninteresting space lead towards treasure. So just by picking random edges, or edges away from the player, you are likely to end up near treasure. It's a bit like the is fox moving through a non-Euclidean space which has more volume near treasure.
Because measuring distance by hops would be absolutely daft.
Bethesda has been building this specific type of game for decades so at this point things like npcs having complex patrols or other behavior is something they've figured out how to do well.
If you enter the camp and it gets high suddenly, nothing is changed, since as a player you know you are in a camp.
The fact the fox stays, chewing through triangles, rather than running though like it would if it was based on meters doesn't matter.
Although, since the fox stays in the camp, you would think it was telling you something, even though it was random chance.