2D Toolkit Forum

2D Toolkit => Support => Topic started by: JBabz on August 21, 2013, 07:49:36 am

Title: [2.1] Simple A * Pathfinding with 2DTK
Post by: JBabz on August 21, 2013, 07:49:36 am
Can any of you fine folks explain to me how I can get Simple A * Pathfinding to work with 2DTK tilemaps?

I feel like it shouldn't be this difficult...

:/

Thanks!

-Joe
Title: Re: [2.1] Simple A * Pathfinding with 2DTK
Post by: unikronsoftware on August 21, 2013, 09:18:54 am
What have you tried?
Title: Re: [2.1] Simple A * Pathfinding with 2DTK
Post by: JBabz on August 21, 2013, 04:30:47 pm
I couldn't really explain what I tried, because i have no idea what i'm doing.. :/
Umm..any starters?
Title: Re: [2.1] Simple A * Pathfinding with 2DTK
Post by: unikronsoftware on August 21, 2013, 05:04:48 pm
It really depends on what youre planning on doing. Are you planning on writing your own A* pathfinding? Use someone elses solution?
Title: Re: [2.1] Simple A * Pathfinding with 2DTK
Post by: JBabz on August 21, 2013, 06:43:15 pm
I'm trying to find someone else's solution that is viable. It is my understanding that I have to convert the tilemap to a format friendly with A * or something?
Title: Re: [2.1] Simple A * Pathfinding with 2DTK
Post by: unikronsoftware on August 21, 2013, 07:45:58 pm
It really depends on what solution you want to use.
Eg. if you want to use unity navmesh with this its perfectly fesible, but you need to make the collision mesh renderable. http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1919.msg9543.html#msg9543
There's also this: http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1329.msg10186.html#new
Title: Re: [2.1] Simple A * Pathfinding with 2DTK
Post by: JBabz on August 22, 2013, 06:22:27 am
Trying to implement this. I get this every frame:
NullReferenceException: Object reference not set to an instance of an object
Pathfinder2D.OnDrawGizmosSelected () (at Assets/Pathfinding/Scripts/Pathfinder2D.cs:741)
Title: Re: [2.1] Simple A * Pathfinding with 2DTK
Post by: JBabz on August 22, 2013, 06:18:09 pm
Okay, I fixed that, but now every tile returns as an ID of -1.
I'm going to just use this thread from now on:
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1329.0.html (http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1329.0.html)