Jump to content

problems with navmesh pathfinding


Recommended Posts

Hi guys! I make rpg game and try to implement pathfinding by using navmesh plugin

there is a nice tutorial and i follow it
but i have problem, no matter what coordinates i pass it always return null
(i build navmesh in Tiled)

there is a code:

        const objectLayer = this.tilemap.getObjectLayer("navmesh");
        const navMesh = this.navMeshPlugin.buildMeshFromTiled("mesh"objectLayer5);
        const path = navMesh.findPath({ x:1500y: 2500 }, { x: 1600y: 2600 });

that what i have in console:


 i tried to pass different coordinates and find path to mouse click. it always return null.   

if i add methods for visially debugging navmesh plugin it game looks like:



Has anyone encountered similar problems?
This plugin has clear tutorial and i'm soo confusing that it doest'n work for me.

I appreciate any guess. 

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...