javascript3dpath-findingplaycanvas

Pathfinding.js in PlayCanvas


I am making a space game using Playcanvas. I want to add some AI to ships that fly around and shoot. I don't have any idea of how to impliment Pathfinding.js on a 3D space, let alone, using the PlayCanvas Script API as well. Does anyone know how to: - Implement Pathfinding.js in a 3D Space - Implement Pathfinding.js into a 3D PlayCanvas World - Impliment Pathfinding.js into a 3D Object, inside a 3D PlayCanvas World - Add basic tasks such as follow, attack, run away using Pathfinding.js

I am kind of a noob at Pathfinding.js, even using 2D, so please be exact, if you want to answer.

Thanks to all of you guys who work hard to help noobs like me!

Thanks much, Noah


Solution

  • Pathfinding.js provides functionality for 2D pathfinding. Note that a fork of Pathfinding.js exists for 3D environments.

    Some PlayCanvas projects that use the 2D version of Pathfinding.js do exist. Namely:

    Note that both of these projects are based on PlayCanvas' previous scripting system. New projects in PlayCanvas default to a newer (better) scripting system, but generally, the code will be very similar.