 <p>Create an imaginary grid at whatever resolution is suitable for your problem: As coarse grained as possible for good performance but fine-grained enough to find (desirable) gaps between obstacles. Your grid might relate to a quadtree with your obstacle objects as well.</p> <p>Execute A* over the grid. The grid may even be pre-populated with useful information like proximity to static obstacles. Once you have a path along the grid squares, post-process that path into a sequence of waypoints wherever there's an inflection in the path. Then travel along the lines between the waypoints.</p> <p>By the way, you do not need the actual distance (c.f. your mention of Pythagorean theorem): A* works fine with an <em>estimate</em> of the distance. Manhattan distance is a popular choice: <code>|dx| + |dy|</code>. If your grid game allows diagonal movement (or the grid is "fake"), simply <code>max(|dx|, |dy|)</code> is probably sufficient.</p>