Skip to content

Carnaux/Pathfinder-THREE-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Pathfinder for Three.js

An easy pathfinder for Three.js using a navmesh!!!

How to use:

Import via script tag (NPM package soon):

<script src="lib/pathFinder.js"></script>

Pass the navmesh geometry( just the geometry, not the mesh!):

 pathfinder = new PathFinder(mesh.geometry);

To find a path call:

 let path = pathfinder.calculatePathPoints( InitialPos, FinalPos);

InitialPos and FinalPos are Vector3.

It returns an array of objects as:

    {
        f: "number",
        v: "Vector3"
    }

Each element(object) of the array is refering to a point of the path.

WARNING!!!

This do not result in a smooth path with large triangles in the navmesh YET.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors