Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Pathfinding solution for a infinite dynamic 2.5D world?

Discussion in 'Scripting' started by Axel-F, Aug 22, 2014.

  1. Axel-F

    Axel-F

    Joined:
    Mar 20, 2009
    Posts:
    223
    Hi,

    I'm looking for a plugin or other solution to realise pathfinding for a 2,5D top down game with an infinite, procedurally world. Think of Diablo with an endless map.

    We'll, the pathfinding solutions I'm aware of, including Unitys very own, require to pre-define a static area where pathfinding works. Maybe even with dynamical obstacles, but nevertheless only within a pre-defined area in world space. I'm basically fine with a limited pathfinding area, but it needs to update as the player moves along his way. I only need a very simple 2D solution in XZ world space but it needs to be absolute dynamical updatable at runtime. Something like "...avoid all obstacles/box colliders around the player within a radius of 10..." - but independent from the players world position. Is this doable?

    Thanks!
     
  2. hpjohn

    hpjohn

    Joined:
    Aug 14, 2012
    Posts:
    2,190
    I assume you are adding parts to the level from prefabs
    Put map graph nodes into the prefabs, then anytime you add or remove map pieces, rebuild the node graph, solve with djisktra