Code Monkey home page Code Monkey logo

Comments (3)

mikewesthad avatar mikewesthad commented on August 13, 2024 1

Sorry this took so long to fix in the readme. Updated it now to warn devs about concave polygons. Hope you got what you were looking for out of that article. Thanks for sharing it. I'll try to read it when I have a few minutes.

from navmesh.

mikewesthad avatar mikewesthad commented on August 13, 2024

hi @solusipse - you aren't doing anything wrong, it's a limit of the current library. That type of polygon is concave, which is a more complicated beast.

There are libraries like poly-decom.js for decomposing a concave polygon into easier to manage convex polygons. It's on the to do list to handle any polygon. The library came about because I needed fast path finding for a game, and the problem that I ran into is that automatically decomposing polygons leads to worse performance than hand-mapping the levels with convex polygons (in my case, specifically rectangles).

Sorry if you lost any time since that wasn't clear - I'll add a note to the readme to clarify this. PRs are definitely welcome if you want to wade into this decomposition feature.

from navmesh.

solusipse avatar solusipse commented on August 13, 2024

Great, thank you for the explanation! I think I'll try with that library you shared, thanks for the link.
Btw, I'm sure that you know about path finding much more than me, could you please let me know what you think about approach presented in this article: https://www.david-gouveia.com/pathfinding-on-a-2d-polygonal-map?

from navmesh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.