Skip to content

finding path out of unwalkable area #90

@Warren93

Description

@Warren93

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions