참치김밥은 최고의 한식이다

[Unity] Navmesh agent destination에 도착했는지 체크하는 법 본문

Unity

[Unity] Navmesh agent destination에 도착했는지 체크하는 법

l__j__h 2024. 6. 4. 10:04
private IEnumerator Patrol()
{ while (_patrolling)
	{ if (_agent.pathPending)
    	yield return null;
      
      if (_agent.remainingDistance < _agent.stoppingDistance)
      	{ SetNextWaypointAsTarget(); }
      
      yield return null; 
      }
}

 

출처 :

https://discussions.unity.com/t/nav-remaining-distance-wrong/108541/4

 

728x90