Skip to content

Pathfinding on a graph with portals, powered by a state machine. Features a 3D graph setup system for seamless integration into complex environments.

License

Notifications You must be signed in to change notification settings

Hrober0/Pathfinding-on-graph-with-portals-and-state-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinding on graph with portals and state machine

Pathfinding consists of solutions for setting and organizing paths. The set points create the graph on which the paths are searched for.

The state machine is used by MPC (guide cube) to define its behavior. Guide cube controller implements basic logic as switch states and also methods allow moving at the path. States were projected to easily add new behaviors. There are 3 basic states:

  • Idle
  • Go to
  • Follow object

image

Pathfinding video: youtube.com/hrober/pathfinding

The whole system was used in-game named Errata.
Errata trailer: youtube.com/errata-trailer

Interesting parts

Pathfinding main script:
/github.com/Hrober0/Pathfinding-on-graph-with-portals-and-state-machine/Scripts/Pathfinder.cs

State machine controller:
/github.com/Hrober0/Pathfinding-on-graph-with-portals-and-state-machine/Scripts/GCubeController.cs

Folder with states:
/github.com/Hrober0/Pathfinding-on-graph-with-portals-and-state-machine/Scripts/States

Used Technologies

Unity and C#

Additional package:

About

Pathfinding on a graph with portals, powered by a state machine. Features a 3D graph setup system for seamless integration into complex environments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages