(Specific feature demonstration is included in the video link) Recently, I’ve been researching how to implement pathfinding for dynamic obstacles, such as vehicles. The challenge with this functionality lies in the fact that vehicles are constantly moving, making it impractical to continuously update the pathfinding map (as it could be very inefficient).
I studied the implementation in the game Project Zomboid and discovered their approach: zombies first pathfind to grid cells around the vehicle, and then adjust their movement based on waypoints near the vehicle (the positions where the mouse hovers in the video).
The purpose of this article is to provide a reference for those with similar requirements, showing how Project Zomboid tackles this problem. Additionally, if the developer of this plugin could implement a similar feature as a demonstration scenario, it would make things even more convenient.
Quick note, that link doesn’t work- doesn’t look like a sharing link, but rather a download link that I wouldn’t be able to access from my user.
From this specific description, I think you may want to look into NavmeshCut. You could attach a NavmeshCut component to the car, and so long as nothing in the vehicle needs to pathfind while they’re not inside of it, or something outside needs to pathfind on top of it (which… are both very unlikely I’d imagine) then you should be good.
You could even have the NavmeshCut only affect the “non-vehicular” agents graph, and have a seperate graph for vehicles that does not get cut by Navmesh Cutting and then vehicles can use pathfinding too, if desired.
Hello, I’ve updated the link; I’m not sure if it’s accessible now.
I’ve been researching this functionality for several weeks, and it seems that NavmeshCut might actually achieve a result similar to what’s shown in the video! Moreover, it doesn’t require generating pathfinding nodes around the vehicle like in Project Zomboid (which involves adding extra logic).
I always thought NavmeshCut was only suitable for scenarios with low update frequency, like tower defense games! I’ll dive deeper into this and study it thoroughly.
Hi Why does FollowerEntity perform so much better than AIPath? How can I configure AIPath to achieve the same results as FollowerEntity?
FollowerEntity can directly reach the target location and smoothly follow the obstacles.(Video ) https://youtu.be/dfCwc84eR08
AIPath can’t even move in a straight line. https://youtu.be/fUd7szQXB-Q
FollowerEntity is much newer than AIPath. FollowerEntity came out earlier this year while AIPath has been around for many many years- I’d say you’re probably seeing the fruits of Aron’s efforts in maintaining this project. So I’d assume it’s possibly related to that- just the experience over time.
From what I’m seeing I think your AIPath may need a Funnel modifier added to it. If I remember correctly that weird wobbliness is due to using a Recast Graph.