-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent ignoring off-mesh links that are far apart #8
Comments
I'm afraid I can't really help you much with this one. Other than the test in the demo, I haven't done anything with off-mesh connections in my own project (no need for them in my case). To be honest, I was quite surprised myself when I put it into the demo and it "just worked". 😆 I do know that the Other than suggesting to try and find out what exactly the difference is between demo and your project (maybe try and use your exact geometry in the demo), I can't really offer advice here. |
Thanks, I'll take a closer look at the demo and try to find out where the problem is. |
Playing around with the demo more I noticed that in some cases the portals don't work. Moving the link back to around where it used to be and it works. EDIT okay it seems like the distance between the two portals can't be very large, or else the agent will just ignore it. I'm not sure why, but moving them close together makes it work (resolves the issue in my project as well). |
Interesting. To be honest, this could be pretty much anything, from a bug in recast/detour itself (would have to check their demo on https://github.com/recastnavigation/recastnavigation to see if this can be reproduced) to the way I build the geometry or the way it is rebuilt on a change. I do not really have a lot of time at the moment to spend on this project, but I'll take a look Monday or Tuesday to see if I can find a quick solution. If not, I'll at least add a note that this feature is definitely not safe to use for production. Does this only happen when you change / add an off-mesh connection after the geometry had already been built (and thus do a |
This still happens even when adding before navigation.init and never calling |
Well, the "good" news is that recast/detour itself exhibits the same behavior in their own demo. I went ahead and created an issue about this on their repo, maybe someone will share some insight: The bad news is then, obviously, that unless they change their implementation or offer advice on how to make it work for longer ranges, there is nothing I can do about it. I'd really love a more flexible "portal" feature in this library, but it seems that the only way for that would be to implement it myself completely (and not utilizing recast's off-mesh connections at all). Sorry, not the best outcome, I know. But at least now we know. |
You could use a chain of off-mesh links slightly outside the map. A-----------------------------B \...1....2....3....4....5.../ But it's quite cumbersome |
Hello, sorry to fill up your issues with basic questions but I'm running into another problem. I set up an agent and link like this:
And the debug mesh displays the link as in the demo
But the agent completely ignores it and will never take the path (pathfinding works well otherwise). I get no console messages except occasionally
applyNewTarget: Unable to request detour move target.
, which seems innocuous as the player does sometimes jump high or seem to be temporarily outside the navmesh bounds. This doesn't seem to interrupt the pathfinding.Thanks for your time, and let me know if you need more information. Any help is appreciated!
The text was updated successfully, but these errors were encountered: