Skip to content
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

[video] pathing issues - taking dead-end routes #24

Open
jdestefx opened this issue Jun 23, 2018 · 9 comments
Open

[video] pathing issues - taking dead-end routes #24

jdestefx opened this issue Jun 23, 2018 · 9 comments

Comments

@jdestefx
Copy link

Having problems getting agents to arrive properly when taking longer routes. Please see the youtube video.

Any advice would be appreciated.

https://www.youtube.com/watch?v=gI_jTiXM5K8

@vincent
Copy link
Owner

vincent commented Jun 24, 2018

Hi,

The problem appears when the agent takes a shortcut over the bridge ?
It could be a configuration mismatch between cellHeight / agentHeight / agentMaxClimb / agentMaxSlope

You could try to run your level in RecastDetour
This way you'll find if it's a mesh/leveldesign issue or a recastjs issue.

@jdestefx
Copy link
Author

Trying to follow the instructions to build the tool under windows 7 64bit but I apparently don't have some "premake" utility.

image

image

@vincent
Copy link
Owner

vincent commented Jun 26, 2018

Sorry I haven't much experience about compiling on Windows, but it seems you nee to install Premake https://premake.github.io and Visual Studio https://visualstudio.microsoft.com/fr/vs/express/

@jdestefx
Copy link
Author

jdestefx commented Jul 1, 2018

Vincent, I posted another video update -- please take a look and let me know if any new ideas come to mind. It seems the more frequently I call crowdRequestMoveTarget, the worse the behavior gets. I can say with a good amount of certainty, that my mesh is just fine (I illustrate path sampling in the video).

https://youtu.be/gSDxceKKYVs

@vincent
Copy link
Owner

vincent commented Jul 1, 2018

One thing you could try is to change the size of the function buffer here
https://github.com/vincent/recast.js/blob/master/src/pre.module.js

Change the 10 (which should be a constant obviously ...) to something much higher like 100 or 1000.
This will bump the ram usage btw.

Honestly 10 seems ridiculously low anyway 🤷

If this does not help, maybe check your crowdUpdate calls frequency ?

@jdestefx
Copy link
Author

jdestefx commented Jul 1, 2018

I assume you're talking about line 618. Do I need to do anything to recompile after making the edit? If so, what is that process?

@vincent
Copy link
Owner

vincent commented Jul 1, 2018

No need to compile if you modify the lib directly, otherwise yeah there is compile script in the package.json

@jdestefx
Copy link
Author

jdestefx commented Jul 2, 2018

I edited line 618 to 100, then 500 - it made no change in behavior.

Because I can arbitrarily request a path from on top of the bridge into the water and get a perfect path every time, I'm starting to believe the problem arises when there are multiple entities taking the same route. I've messed with various agent parameters that would affect stacking, like agent radius and I've also tried a range of "agentSeparationWeight", but still no luck on getting entities to take the most appropriate and direct route.

I'm wondering if there is a way to disable "awareness" of neighboring entities so they won't try to avoid each other on their routes.

@vincent
Copy link
Owner

vincent commented Jul 2, 2018

Hum, about your last point, I think it is controlled by the separationWeight parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants