Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- // Move the nav agent
- var navPoint = navMesh.NavMeshQuery.FindNearestPoly(ToSV3(transform.position), ToSV3(Vector3.one * 2));
- agent.Position = navPoint.Position;
- navPoint = navMesh.NavMeshQuery.FindNearestPoly(ToSV3(destination), ToSV3(Vector3.one * 2));
- agent.RequestMoveTarget(navPoint.Polygon, navPoint.Position);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement