Jump to content

Pathfinding headache


eljuko
 Share

Recommended Posts

Hello all,

 

I'm having super hard time while trying to implement https://github.com/bgrins/javascript-astar to my testproject @ http://eljuko.com/pathfindingTest/

you can see the js source here http://eljuko.com/pathfindingTest/scripts/main.js

 

I'm getting pretty frustrated with this since it "almost" works but not at all  :wacko:. So please help the stupid to right direction.

 

known issues;

- u can't click twice in the same spot. or ofc u can but it wont fire.

- sometimes fails to create path

- silly waypoints sometimes

- grid in -90 degree angle?!

 

EDIT: after few hours of more buttscratching, i kinda start to get to bottom of this. something is not removing the goal node from the closed list when the object reaches its destination.

anyone knows this plugin?

 

If anyone knows how to get this working or can provide an algorithm that works; i'll be forever grateful  :D

 

 

Thanks, eljuko

- the stupid

Link to comment
Share on other sites

After the night I got the 3 first "known issues" resolved. needed to get hands dirty with the plugin itself, thank "god" there was only 400 lines of well commented(<- witchcraft) code so it didnt take as much time as it could'v been.

 

"use third party solutions" - they said, "it'll be fun"...

 

Anyhow, in case someone else wants to use this particular plugin, there's a function graph.init() that seem to successfully clear everything.

 

now i just rearrange the grid array somehow to resolve the last issue.

 

 

- eljuko

Link to comment
Share on other sites

  • 1 year later...

Sorry to resurrect an old thread, but would you mind sharing your code for your pathfinding test?

I've recently started learning babylon and have been experimenting with something similar to this, would be awesome to see how you solved it. 

Edit* Just realized I can view the source... I'm not a smart man haha

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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