Simple programm, that draws map and finds the best way to a random point
In project files you can find a demo scene, that represents how this implementation of pathfinding works. Main objects of this scene are:
- "1st person" - has an attached script "Navigation.cs". "Navigation.cs" was written for drawing map and for computing the best way to desired point. This object has also child components, Agent and Agent Camera.
- "Agent Camera" - has an attached script "CameraFollow.cs", that makes this object follow the agent.
- "Agent" - has an attached script "AgentWalk.cs". "AgentWalk.cs" calls "Navigation.cs" to draw a map, and to draw a way. Map and current Way are lists, that consists of Points (fig.1).
fig.1 - class "point"
In this demo, while playing you see agent moving from his "eyes". But also, you can press debug buttons (F1, F2) to view his current way, and also preview a map as shown on fig.2-3.
fig.2 - way points of the current way (F2)
fig.3 - map points (F1)