Everyone so for I love this plugin if that is the correct term :). I have a bit of an issue with it and don’t know if this is the correct section to post this. Hopefully it’s alright
I have a grid map setup for my game and the player is able to create roads. The roads have 2 Tilemaps. One is for colision of the road which in my case is always dirt and the road sprite which is walkable.
Here is the scan I get from the Astar Path. I have outlined with purple where are my colliders of the road which aren’t being detected. http://prntscr.com/qw3zaw
The ‘Diameter’ for the collision setting is set to 0.3. That means it will only check in a small circle in the middle of the node for colliders (the width of the circle will be 30% of the node width). Set it to something closer to 1 for better results.
In the current beta there is a visualization of this value which helps to avoid these kinds of issues.
It does look like your corridor is much more narrow than a single node.
You cannot have it both ways. In this case you want to avoid making the node unwalkable due to a narrow corridor, but in the other case you want to detect colliders near the edges of the node.
You can increase the resolution of the graph to be able to differentiate between finer features.
In your last screenshot you show that the hole that was dug is pretty narrow. So the collider definitely overlaps the node. So it is reasonable that you’d want a smaller diameter for your collision testing.
However earlier you showed the colliders that you do want to detect. They are definitely further away from the center of the node than the edges of the hole in your last screenshot. So it’s hard to set the diameter to any value which works for both.
Oh ok I understand. I’ve even tried creating two different grid graphs and check the collision for both but seperated. Did not work. Do you maybe have any suggestions on how I could achieve this or if there is any tutorial on it?
Thanks for all the help so far ! I really appreciate you taking the time
Well, your constraints are very inconsistent.
It is possible to do it with multiple graphs and some code, but I don’t see why you have to handle the different colliders that differently.
Am I correct in interpreting that you want the nodes touched by the purple colliders (here: https://prnt.sc/qw3zaw) to be made unwalkable?