You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that if you try to generate a path where the starting point is already in an unwalkable area, the pathfinding fails. This makes sense. My question is, how do I get around this issue if I need to allow the user/player to get a path out of an unwalkable area that they're currently stuck in? I have tried gathering all the tile coordinates of the tiles in the unwalkable area where the player is starting from and then calling setAdditionalPointCost on each tile, setting its point cost to zero (i.e. same cost as walkable area in my case). But this does not seem to have the desired effect of making the area in the player's vicinity walkable/path-able. Is there any straightforward way of getting around this issue? Thanks in advance for any help.
The text was updated successfully, but these errors were encountered:
I've noticed that if you try to generate a path where the starting point is already in an unwalkable area, the pathfinding fails. This makes sense. My question is, how do I get around this issue if I need to allow the user/player to get a path out of an unwalkable area that they're currently stuck in? I have tried gathering all the tile coordinates of the tiles in the unwalkable area where the player is starting from and then calling
setAdditionalPointCost
on each tile, setting its point cost to zero (i.e. same cost as walkable area in my case). But this does not seem to have the desired effect of making the area in the player's vicinity walkable/path-able. Is there any straightforward way of getting around this issue? Thanks in advance for any help.The text was updated successfully, but these errors were encountered: