move to the nearest tile if possible
This commit is contained in:
parent
67cd0dfb29
commit
1c4e803dd7
3 changed files with 77 additions and 4 deletions
|
@ -31,7 +31,7 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface {
|
|||
.getTileIndexAt(this.gameScene.CurrentPlayer.x, this.gameScene.CurrentPlayer.y);
|
||||
this.gameScene
|
||||
.getPathfindingManager()
|
||||
.findPath(startTile, index)
|
||||
.findPath(startTile, index, true)
|
||||
.then((path) => {
|
||||
const tileDimensions = this.gameScene.getGameMap().getTileDimensions();
|
||||
const pixelPath = path.map((step) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue