Giter Site home page Giter Site logo

spood / pcgpathfinding Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 2.0 43.6 MB

An A* pathfinding implementation with PCG (Procedural Content Generation) to generate custom splines in unreal engine between two points

License: MIT License

C# 9.12% C 16.58% C++ 74.31%
procedural-content-generation unreal-engine a-star-algorithm level-generation pathfinding world-generation

pcgpathfinding's Introduction

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/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.