Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 733 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 733 Bytes

Pathfinding

Pathfinding - using Unity Navmesh, ECS and Burst.

This fork represents self-sufficient module that can be used with Unity Entities and NavMesh.

Authoring pathfinder

In order to add all necessary components to authoring object simply add PathfinderAuthoring component.

Specify agentID and minimal query distance and it's ready to be baked.

Finding path

To find a path you need to get PathfinderAspect of relevant entity.

For example:

var path = SystemAPI.GetAspect<PathfinderAspect>(entity);
path.FindPath(pathFrom, pathTo);

After query is done dynamic buffer PathBuffer will be filled with direct path position. Pathfinder component will also get it's pathStatus field updated.