Jump to content

Show preview of calculated path


P4UL
 Share

Recommended Posts

Hello!

I have a Tilemap and two objects. The first object willl calculate the shortest path to the second one. If the player hits enter, the object will use this path. Before the player will press enter I want to show a preview of the path.

How would I do this? I could simply create a new Sprite for every point in the path and set the position to that point. The path will be recalculated very often, so I would permanently destroy the path sprites and recreate them. Is there a better option to achive this?

Thanks in advance!

Link to comment
Share on other sites

Thank you very much! I already used a sprite pool for bullets, but I simply forgot that I could use it for other things than bullets.

The other approach with the bitmapData seems very good. I think I will use that. Thank you for the link!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...