AI implement for 2D mode, which implements A* Pathfinding Project
Their package files will not included in this repository, visit their site to download it :)
- Attach
A Star Character Movement 2D
to your character entity - Attach
AI Lerp
orAI Path
component - Don't enable rotation for
AI Lerp
orAI Path
- If you use
AI Path
, setOrientation
toYAxisForward (for 2D games)
setRadius
andHeight
fit to your character
- Create empty game and attach
Pathfinder
component
- In
Graph
section selectGrid Graph
- In
Grid Graph
setting, enable2D
andUse 2D Physics
- Then set
Width
,Depth
,Node size
andCenter
, make it cover the map
- Set
Collider type
toPoint
- Set
Obstacle Layer Mask
by select layers that you want to make it as obstacles
- Use
AI Lerp
for characters - Set
Pathfinder
→Connections
toFour