Agents: 10.000.
Todo: avoid obstacles, ladders, jumping off, climbing, body and leg rotation, agent fov, path recalculation, doors, agent brain, nodes (corners, ammo, jump zone), agent types (citizen, hostage, swat, player, boss) etc.
What do the arrows point towards? Apparently not the direction of travel since some are pointed away from the direction of travel.
Its the direction of legs. At start the direction not fixed yet, it fixed when agent move to second path point. It fixed for player agent if you can found (just click and he go there). Also will be added direction of body (rotation) or agent fov.
Agent arrows have been fixed. Added detail mesh for snapping to real floor instead navmesh. Added smoothing for climbing stairs and rocks.
The ability to leave the navigation mesh, for example, when pushed or during an explosion, has been added, but not finalized. However, there’s a problem with how to return to the navigation mesh, as without navigation, the agent becomes blind and must navigate by touch using the capsule, which can lead to misplaced objects and getting stuck. Although it looks realistic to be able to push someone with a shotgun blast or be knocked back by an explosion. And the capsule should be able to climb stairs, which is most likely a “rapier.js” feature.
I think a common solution is to always keep track of the last “good” position the entity was on.. and if they get stuck.. (detected as not making progress on pathing.. or whatnot), warps back to its last safe spot on the navmesh… or does some raycasts to see if it can find navmesh underfoot.
If an agent was following their path and then slightly deviated from it due to a shot to the back, the bot should attempt to continue toward their target if there’s no gap beneath them. If they haven’t returned to the grid within 1-2 seconds, they should either start walking back to their previous point or search for another nearby point. The simplest approach is to maintain navigation even during an explosion, which has already been done, but leave the option to push the agent away from the shot, leaving them on the edge of the gap.
