Reputation: 779
I have several questions about using "correct" for the layer collision.
Is it possible to make a bot from a point A using a collision tiles available? For each map, I want to make a bot from point A to point B. But to add levels easily, I want to integrate my starting point and my end point.
Is it possible to differentiate one tile to another for bot / player? To allow, for example, the user can place his character but not the bot.
I would like to determine the direction for a bot. Among the four movements of the bot (up, down, left, right) with the collision system I can not know if it is possible to know the only way possible when the other 3 are blocked, except for one test one hand the solutions, but in this case we see the character test each solution (ie switch positions). Is there a way to simulate the worst travel before the bot to do for the right to take the right solution?
Thank you in advance for your answers
Upvotes: 2
Views: 572
Reputation: 502
I think you're looking for pathfinding, Perhaps you could try Astar pathfinding for impactjs
Haven't got time to try it myself but i think its working
Upvotes: 2