I'm not making a game with portals in it (one way or bidirectional). These portals instantly teleport characters from one location to another. How would I implement pathfinding?

Here's an animation showing the portals in action, and different paths taken: http://www.makeitshareit.com/animation/86137

How do I perform pathfinding whilst taking in the possibility of using the portals as shortcuts? If I just use A*, the portals may wreak havoc with the admissibility requirement. How can I also make it reasonably efficient, such as avoiding quadratic complexity with respect to the number of portals?

  • \$\begingroup\$ Alright perhaps I'm being antsy...but what portals are you referring to if you are not making a game with portals in it? \$\endgroup\$
    – Katana314
    Oct 3, 2013 at 3:07
  • 3
    \$\begingroup\$ This has been answered here and here \$\endgroup\$ Oct 3, 2013 at 3:13
  • 3
    \$\begingroup\$ Voting to close as a duplicate of questions from stackoverflow.com, as BlueRaja commented. \$\endgroup\$ Oct 3, 2013 at 5:18


Browse other questions tagged .