{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate/",
  "atlas": "https://www.pystone.net/?node=uwa-answer-navmesh-point-from-two-dimensional-coordinate#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate.md",
  "context": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate.context.json",
  "knowledgeVersion": "224c990773de.5fa8af6e39fa",
  "build": {
    "siteCommit": "224c990773de166d23a886306577dd90379529ce",
    "notesCommit": "5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a",
    "builtAt": "1970-01-01T00:00:00.000Z",
    "version": "224c990773de.5fa8af6e39fa"
  },
  "id": "note:uwa-answer-navmesh-point-from-two-dimensional-coordinate",
  "slug": "uwa-answer-navmesh-point-from-two-dimensional-coordinate",
  "title": "Unity2019或者更高版本，有没有办法把二维坐标（无y值） 转换到 NavMesh上的点。",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "石心.Yong"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "Unity2019或者更高版本，有没有办法把二维坐标（无y值） 转换到 NavMesh上的点。",
  "contentRole": "source",
  "sourceType": "source",
  "sourceMetadata": {
    "author": "石心.Yong"
  },
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "external_source",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "d529bcfa47f28ce2b1716a62d93d8c97321ee81364962156aa8721aeaa4efd0d",
  "assets": [],
  "headings": [
    {
      "depth": 1,
      "text": "Unity2019或者更高版本，有没有办法把二维坐标（无y值） 转换到 NavMesh上的点。",
      "anchor": "unity2019或者更高版本有没有办法把二维坐标无y值-转换到-navmesh上的点",
      "citation": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate/#unity2019%E6%88%96%E8%80%85%E6%9B%B4%E9%AB%98%E7%89%88%E6%9C%AC%E6%9C%89%E6%B2%A1%E6%9C%89%E5%8A%9E%E6%B3%95%E6%8A%8A%E4%BA%8C%E7%BB%B4%E5%9D%90%E6%A0%87%E6%97%A0y%E5%80%BC-%E8%BD%AC%E6%8D%A2%E5%88%B0-navmesh%E4%B8%8A%E7%9A%84%E7%82%B9"
    },
    {
      "depth": 2,
      "text": "问题",
      "anchor": "问题",
      "citation": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate/#%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 2,
      "text": "我的回答",
      "anchor": "我的回答",
      "citation": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate/#%E6%88%91%E7%9A%84%E5%9B%9E%E7%AD%94"
    },
    {
      "depth": 2,
      "text": "来源与关系",
      "anchor": "来源与关系",
      "citation": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "claims": [],
  "outgoing": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "上位集合：我的 UWA 问答",
      "citation": "https://www.pystone.net/notes/uwa-answer-navmesh-point-from-two-dimensional-coordinate/#%E6%9D%A5%E6%BA%90%E4%B8%8E%E5%85%B3%E7%B3%BB"
    }
  ],
  "incoming": [
    {
      "id": "note:my-uwa-answers",
      "title": "我的 UWA 问答",
      "url": "https://www.pystone.net/notes/my-uwa-answers/",
      "atlas": "https://www.pystone.net/?node=my-uwa-answers#knowledge-atlas",
      "label": "我的 UWA 问答",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "2021-05-13：Unity2019或者更高版本，有没有办法把二维坐标（无y值） 转换到 NavMesh上的点。（资源管理、AI）",
      "citation": "https://www.pystone.net/notes/my-uwa-answers/#2021"
    },
    {
      "id": "note:game-graphics-and-runtime",
      "title": "游戏图形与运行时",
      "url": "https://www.pystone.net/notes/game-graphics-and-runtime/",
      "atlas": "https://www.pystone.net/?node=game-graphics-and-runtime#knowledge-atlas",
      "label": "游戏图形与运行时",
      "origin": "explicit",
      "humanReviewed": true,
      "context": "我的UWA问答中的“2021-05-13 - Unity2019或者更高版本，有没有办法把二维坐标（无y值） 转换到 NavMesh上的点。”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#%E6%88%91%E7%9A%84uwa%E9%97%AE%E7%AD%94"
    }
  ],
  "contentMarkdown": "# Unity2019或者更高版本，有没有办法把二维坐标（无y值） 转换到 NavMesh上的点。\n\n> [!note] 我的 UWA 问答\n> 本文收录我在 UWA 问答发表的公开回答。问题内容归原提问者；回答保留当时语境，技术结论可能受 Unity 版本、平台和项目条件限制。\n\n## 问题\n\n老问题了，NavMesh不能直接用射线打，所以鼠标点击位置和无高度位置难以精确转换到NavMesh上。\n\n早期的解决方式要么是用 NavMesh.CalculateTriangulation构造一个碰撞体，但是这样会因为丢失HeightMap而丢失精度；\n\n要么是保留生成NavMesh用的mesh自行生成一个优化模型，这么做又容易出现错误。\n\n已经是几年前的老问题了，不知道现在Unity版本有没有什么好的办法解决点击确定移动位置以及无高度坐标对到NavMesh的点。\n\n- 提问者：欧月松\n- 提问时间：2021-05-12 04:45:49\n\n## 我的回答\n\n貌似Unity在API上对从NavMesh获取Mesh数据的接口没有什么改进\n\n- 回答时间：2021-05-13 00:51:55\n- 最后更新：2021-05-13 01:05:06\n- 采纳状态：已采纳\n\n## 来源与关系\n\n- 上位集合：[[10-计算机、信息技术与工程/05-游戏图形与运行时/我的UWA问答/我的UWA问答|我的 UWA 问答]]\n- UWA 标签：资源管理、AI\n- 原始问题：[Unity2019或者更高版本，有没有办法把二维坐标（无y值） 转换到 NavMesh上的点。](https://answer.uwa4d.com/question/609a7c7d6bb31032f9791664)\n- 源页最后更新：2021-05-18 05:55:26\n"
}
