Search Unity

How to implement visibility graph path-finding to detect paths (i.e. visibility connections)?

Discussion in 'Scripting' started by fermas, Sep 26, 2015.

  1. fermas

    fermas

    Joined:
    Sep 21, 2015
    Posts:
    15
    I am struggling to find good tutorials or introductory materials or code snippets, or elaborate suggestion on how to implement continuous path-finding trough visibility graphs. Notice, I know that grids can be used even when movement is not achieved trough grids (e.g. Theta*). But for my current needs, I really have to implement a real visibility graph path-finding.

    First, I understand the logic of such an approach: 1) finding the points that go at each corner around obstacles, 2) calculating which of these points have direct connections to each other, 3) then applying A*. I am able to do steps 1 and 3 by my own, but I can't find out how to do number 2. It means, how can I find out which points connect to each other and then transform it into an array to use with A*, in an efficient manner in terms of computer processing (i.e. avoinding raycast)?

    I use Unity and C#, but also favor pseudo-code format. Please, suggestions, tutorials, sources, are all welcome.
     
  2. MHCL

    MHCL

    Joined:
    Aug 1, 2018
    Posts:
    1
    for step 2 maybe u could use a raycast from point A to point B to see if there is anything in the way. If not they are connected