Skip to content

Unity project with Flow Field implementation based on Eikonal Equation.

License

Notifications You must be signed in to change notification settings

bjkarasek/flowfield-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flow Field implementation based on Eikonal Equation for Unity

Socials

Twitter | Youtube

Showcase video

IMAGE ALT TEXT HERE

Description

Flow Field implementation based on Eikonal Equation.

  • The directions are more accurate than on a regular Flow Field so the paths calculated are smooth instead of being "squarish".
  • Calculates three values for each cell:
    • Flow direction
    • Current direction goal - position of the cell that the flow is directed towards.
    • Distance to destination (gradient) - distance to the destination cell.
  • Handles obstacles.
  • Can handle tiles with different movement speed (not presented in the project).
  • Eikonal Equation is not perfect - distance values and directions are not always completely accurate. It can be easily seen for 2x2 pathfinding with destination on 1x1, where gradient value on 2x2 is 1.71 instead of being ~1.41.

Implemented on Unity 2022.3.5f1.

Performance

Time complexity: O(width * height) with a fairly high constant.

Performance

About

Unity project with Flow Field implementation based on Eikonal Equation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published