eljuko Posted September 17, 2015 Share Posted September 17, 2015 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 . 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 Thanks, eljuko- the stupid Quote Link to comment Share on other sites More sharing options...
eljuko Posted September 18, 2015 Author Share Posted September 18, 2015 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 Quote Link to comment Share on other sites More sharing options...
Jaskar Posted September 18, 2015 Share Posted September 18, 2015 Hello, It's good that you solved your problem.Is there a demo link available ? Quote Link to comment Share on other sites More sharing options...
eljuko Posted September 19, 2015 Author Share Posted September 19, 2015 Hey, I uploaded it back to http://eljuko.com/pathfindingTest/ Also the grid is now properly rotated and it is created from image Still having some issues with the offsets, but shouldn't be too much of a problem. - eljuko jerome 1 Quote Link to comment Share on other sites More sharing options...
zigazak Posted January 10, 2017 Share Posted January 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.