https://www.reddit.com/r/Unity3D/comments/fka5cb/comment/fkv56vo/
https://discussions.unity.com/t/navmesh-calculatepath-is-acting-weird/210699
위 링크들

NavMesh.CalculatePath is acting weird
I am creating a system where i need to use the CalculatePath method for generating a road for my character. But i have some issues with it. It doesn’t handle slopes that well. The code is very simple in this example. Vector3 startPos = new Vector3(0,0,0); Vector3 endPos = new Vector3(10,5,0); NavMeshPath path; NavMesh.CalculatePath(startPos, endPos, NavMesh.AllAreas, path); If you look at the image is the left image the one i want. But it calculate the path as the image to the right. Why d...
discussions.unity.com
처럼 CalculatePath로 경로 구하면 이거 경사면은 무시되던데 이거 해결 어케 함? ㅜㅜ 구글 다 뒤져도 해결방법이 없노
네비메시가 제대로 구워졌는지 확인해보셈 3d 오브젝트 모두 비활성화 해도 구워진 네비메시는 기즈모로 보임
ㅇㅇ 제대로 구워짐 agent를 setdestination으로 이동시키면 경사로 제대로 인식하고 움직임
내브매쉬로 경사면에 길깔았는데도 무시됨? - dc App
ㅇㅇ 제대로 구워짐 agent를 setdestination으로 이동시키면 경사로 제대로 인식하고 움직임
setdestination 으로 이동하면 잘 되는데, CalculatedPath 쓰는 저 링크 내용대로 코드 작동하면 경사면이 무시되는게 문제란거지? - dc App
네ㅜ
Navmesh.AllArea 말고 너가 구운 Area 이름 넣어볼래? - dc App
해봤는데 난 안되는데..ㅠ 님은 Area 이름 넣으면 되나요??
네비메시가 없는지역을 이동할리가 없는데... 만약에 2층 3층 복잡한 지형이면 베이크 할때 에이전트의 높이를 늘려보셈
NavMeshHit hit; NavMesh.SamplePosition(Destination, out hit, maxSampleDistance(원하는 길이만큼 모르겠으면 5f정도), NavMesh.AllAreas); NavMesh.CalculatePath(startPos, hit.position, NavMesh.AllAreas, navMeshPath); CalculatePath가 예민했는지 모르겠는데 유효한 지점이 아니면 고장날수도 있으니 먼저 유효지점 부터 탐색해보는것도 좋을듯
링크처럼 경사면은 path 배열에 안들어가더라고... 평지는 잘 되는데
계속 찾아보니까 CalculatedPath가 최적 경로를 찾는거라 시작지점에서 끝지점까지의 직선 경로를 구하는게 당연한거일듯? 이건 진짜 이렇게 만들어진거라 경사로 포함해서 경로 짜진 못할거 같음 - dc App
평지에서는 코너나 장애물 이런 것들은 다 감지해서 장애물 피해서 최소 거리 반환해주는데 경사로만 인식이 안되네...