I am using BDX (Blender with libgdx engine) to create my game. I am not sure on how to implement 3D path finding using A* search. I looked into gdx-ai, but that is for 2D.

  • 2
    \$\begingroup\$ Have you tried to implement the algorithm described on wikipedia? What snag have got into? \$\endgroup\$ – Vaillancourt Jan 26 '19 at 22:43
  • \$\begingroup\$ I need to know how to construct navmesh, which I do not know how in libgdx (java) \$\endgroup\$ – kirtan09 Jan 28 '19 at 16:04
  • \$\begingroup\$ Perhaps asking about this first would be more appropriate then. You might want to add what you've tried and what did not work. \$\endgroup\$ – Vaillancourt Jan 28 '19 at 16:33

Having used A* path finding algorithms previously, my advice would be to take your Terrain, and break it down into smaller rectangles. Run a check to see if any of these rectangles co-inside with collidable entities. If they do, mark them as solid. From there, ensure each rectangle has a node, and continue as you would for calculating with 2D A*.

When it comes to Y: This depends on how you have implemented the floor/terrain. Personally, I just set Y to be the height of the terrain at the current point. This works fine for me.

If you are also unfamiliar with A* path finding in 2D, there is a really good game dev series by TheCherno on YouTube that covers this which i'd advise looking at.

Hope that helps!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.