dorkhub

PCGPathfinding

An A* pathfinding implementation with PCG (Procedural Content Generation) to generate custom splines in unreal engine b…

spood
C++637 forksMITupdated 2 years ago
git clone https://github.com/spood/PCGPathfinding.gitspood/PCGPathfinding

PCGPathfinding

An A* pathfinding implementation that can be used with PCG (Procedural Content Generation) to generate custom splines.

Project is made in Unreal 5.2

PCG Graph

Demonstration

Explanation

  1. Surface Sampler generates a grid of points with settings:
  • Points Per Squared Meter = 1.0
  • Point Extents = (500,500,500)
  • Looseness = 0.0
  1. 2 Get Actor Data nodes find an object with tag "Start" and "End"
  2. PCG Get Start End Points goes through each point on the sampled grid (from step 1) and adds attributes for DistanceToStart and DistanceToEnd and outputs them.
  3. Select the smallest DistanceToStart and DistanceToEnd and passes them as points to the BPCG Pathfinding node
  4. BPCG Pathfinding does some magic to calculate the shortest path between the start and end in the A* pathfinding and outputs it as Points
  5. These Points are passed to Create Spline

Demonstration Video

demo.webm

Blueprints

Feel free to inspect the blueprints without having to open the project:

PCG_Pathfinding (ExecuteWithContext) https://blueprintue.com/blueprint/m-o5o5_1/

PCG_GetStartEndPoints (ExecuteWithContext) https://blueprintue.com/blueprint/6nzzw6e9/

PCG_GetStartEndPoints (PointLoopBody) https://blueprintue.com/blueprint/lnuqqy4n/

more like this

FyWorld

FyWorld - Base-Building / Simulation Game & Tutorial in Unity

C#331

bit_gossip

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

Rust50

search

search projects, people, and tags