Skip to content

easystar update grid #12

Description

@samvieten

Hi, using Phaser Plugin.
Tried to update the grid via:

pathfinder.setGrid( mapLayerData, walkables );

path retuned is null.

  • pathfinder (easystar plugin loaded)
  • mapLayerData -> The grid data,
  • walkables -> walkable tiles.

initialization works fine, but when I add / remove tiles I want to update the grid,
so I call again:

pathfinder.setGrid( mapLayerData, walkables );

Since then the returned path is always null:

pathfinder.setCallbackFunction(function(path) {... console.log(path); //returns null }

best regards,

sam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions