Add velocity weights or custom properties to resultant tile mesh #431
Replies: 1 comment 3 replies
-
Hi @niko-dellic! This is possible, but requires some setup. During the navmesh generation process you can mark areas with your own area ids. e.g. see https://recast-navigation-js.isaacmason.com/?path=/story/advanced-custom-areas--compute-path If you want given areas to have different costs for traversal, e.g. corresponding to a faster/slower speed, you can configure a When moving your agents, either with a detour Crowd or your own implementation, you can get the polygon your agent is currently on, the get the area id you've given it with getPolyArea, and increase the speed of your agent. |
Beta Was this translation helpful? Give feedback.
-
First of all, great work on recast-navigation-js, I'm super excited to see where this library goes.
I have three overlapping questions:
I'm currently generating these properties post hoc with the debugger mesh object, extracting the points, and raycasting downwards to get the origin object. This is very computationally intensive so it would be great if I could avoid it.
Thanks again and looking forward to further development of recast-navigation-js!
Btw, I'm writing in pure vanilla so when I have a little free time, I would be happy to contribute some basic examples.
Beta Was this translation helpful? Give feedback.
All reactions