Unity Day34

Unity Day34

A Star ( A* )

PathFinding.cs

두 노드 간의 거리를 절댓값을 통해 계산하고 가로 거리와 세로 거리를 비교하여 계산

PathFinding.cs

이전의 GetDistance()를 통해 노드들의 Cost를 계산하고 openSet(갈 수 있는 곳)에 저장한다

PathFinding.cs FindPath_1

PathFinding.cs FindPath_2

아직 이해도가 떨어짐

코드를 보고 다시 한번 점검 하면서 이해를 해봐야겠음

from http://jaehyeong-98.tistory.com/41 by ccl(A) rewrite - 2021-10-01 22:26:54