Search Unity

need help using voxel points in space for pathfinding ?

Discussion in 'Scripting' started by dudester, Oct 14, 2015.

  1. dudester

    dudester

    Joined:
    Oct 25, 2014
    Posts:
    371
    Hi all , so im developing a voxel terrain engine , its free for the community since its mostly this community that taught (spelling ? ) me all this cool stuff i thought id give back a bit , so anyway what im trying to figure out (which a google search has failed to yield any results for ) is to use my voxel data to create navmesh of sorts or even a valid path from point a to point b , just a general direction of travel and possible waypoints marking those locations , it doesnt have to be complex just a simple path , now im not asking for a script , just some suggestions or pointers when doing this would be a great help , or even some links to some work on it .
    Thanks !
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    A* algorithm

    Each node is a voxel with empty spots above it (for some height).

    It's neighbours are the voxels to the each side that are within a certain height limit.

    Cost between nodes is node width + some cost for large height differences.
     
  3. dudester

    dudester

    Joined:
    Oct 25, 2014
    Posts:
    371
    will this approach be expensive? or not really ? sounds good though ill definitly look into it , just to clarify , i must use the voxels value as the cost , which in my case if its zero the cost is full and if its not then the cost is less ?
    as for the cost between nodes , that'll be tricky due to chunking but im sure i could handle it .