Thread: Recast / Detour
View Single Post
Re: Recast / Detour
Old
  (#28)
Neoptolemus
Member
 
Status: Offline
Posts: 93
Join Date: Apr 2012
Default Re: Recast / Detour - 18-08-2015

So quick update. Further tweaks to the code now has the bot running flawlessly around cs_italy for a good 15 minutes, never getting stuck. It even was able to fix itself when it was going up the large stairs towards the wine cellar, missed them and accidently started running up the ledge on the other side of the railings instead. It stopped, went back and tried again.

I then tried the bot on de_chateau and it immediately got caught on a simple corner and got stuck. D'oh!

I've implemented a new check. If the bot's next waypoint is no longer directly reachable, it first looks to see if a point a few units to the left or right of the point is accessible, and if it is, then it inserts that new point into the path. Failing that, it tries a point to the bot's left or right and sees if that point can reach the waypoint. Like so:



It doesn't work flawlessly, but it seems to happen often and usually succeeds. I've also added flags to points saying whether or not it's compulsory or if the bot can skip it if the next point in the path is directly reachable. These "helper" points are always compulsory of course.
  
Reply With Quote