Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Rubix

I'm trying to call a function from my astar class, but the following code is giving me an error: "undefined is not a function"

var pathFinder = new ig.game.entities.astar();
			this.path = this.pathFinder.findPath(this.goalX / 32, this.goalY / 32, Math.floor(ig.input.mouse.x / 32), Math.floor(ig.input.mouse.y / 32));

findPath is indeed a function so I don't know what the issue is.

1 decade ago by Joncom

Perhaps in line 2, where you typed:
this.path = this.pathFinder...

You meant to type:
this.path = pathFinder...
Page 1 of 1
« first « previous next › last »