{
  "schemaVersion": "0.11.0",
  "canonical": "https://www.pystone.net/notes/uwa-answer-world-to-screen-point-invalid-coordinate/",
  "atlas": "https://www.pystone.net/?node=uwa-answer-world-to-screen-point-invalid-coordinate#knowledge-atlas",
  "markdown": "https://www.pystone.net/notes/uwa-answer-world-to-screen-point-invalid-coordinate.md",
  "context": "https://www.pystone.net/notes/uwa-answer-world-to-screen-point-invalid-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-world-to-screen-point-invalid-coordinate",
  "slug": "uwa-answer-world-to-screen-point-invalid-coordinate",
  "title": "WorldToScreenPoint获取到的屏幕坐标异常",
  "type": "note",
  "visibility": "public",
  "idStability": "rename-stable",
  "author": {
    "name": "石心.Yong"
  },
  "publisher": {
    "name": "Perrin Yong",
    "profile": "https://www.pystone.net/profile/"
  },
  "aliases": [],
  "summary": "WorldToScreenPoint获取到的屏幕坐标异常",
  "contentRole": "source",
  "sourceType": "source",
  "sourceMetadata": {
    "author": "石心.Yong"
  },
  "isMoc": false,
  "mocRecognition": "none",
  "generated": false,
  "attribution": "external_source",
  "domain": "10-计算机、信息技术与工程",
  "tags": [],
  "mocs": [],
  "contentHash": "8f90fadfdfe24a73bb08aba85a81de511f457548b17aa47dde885ff9aea1484f",
  "assets": [
    {
      "reference": "assets/60acab5d6bb31032f979189d/01.gif",
      "url": "/media/74176487a4853263120f.gif",
      "mediaType": "image/gif",
      "contentHash": "74176487a4853263120fc0c48105cd921fcc87791e5371b7f9cf9b0a1da03d27",
      "byteLength": 85492,
      "width": 666,
      "height": 376
    },
    {
      "reference": "assets/60acab5d6bb31032f979189d/02.png",
      "url": "/media/cb278cf6884da0881287.png",
      "mediaType": "image/png",
      "contentHash": "cb278cf6884da0881287db9a28ff0190682c44a95a04ef50bda29c297f16a951",
      "byteLength": 20194,
      "width": 269,
      "height": 169
    },
    {
      "reference": "assets/60acab5d6bb31032f979189d/03.png",
      "url": "/media/e79783f01ae466e6befd.png",
      "mediaType": "image/png",
      "contentHash": "e79783f01ae466e6befda28596023e6adabb61a978585ed98458d58d55e8048a",
      "byteLength": 3807,
      "width": 246,
      "height": 106
    }
  ],
  "headings": [
    {
      "depth": 1,
      "text": "WorldToScreenPoint获取到的屏幕坐标异常",
      "anchor": "worldtoscreenpoint获取到的屏幕坐标异常",
      "citation": "https://www.pystone.net/notes/uwa-answer-world-to-screen-point-invalid-coordinate/#worldtoscreenpoint%E8%8E%B7%E5%8F%96%E5%88%B0%E7%9A%84%E5%B1%8F%E5%B9%95%E5%9D%90%E6%A0%87%E5%BC%82%E5%B8%B8"
    },
    {
      "depth": 2,
      "text": "问题",
      "anchor": "问题",
      "citation": "https://www.pystone.net/notes/uwa-answer-world-to-screen-point-invalid-coordinate/#%E9%97%AE%E9%A2%98"
    },
    {
      "depth": 2,
      "text": "我的回答",
      "anchor": "我的回答",
      "citation": "https://www.pystone.net/notes/uwa-answer-world-to-screen-point-invalid-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-world-to-screen-point-invalid-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-world-to-screen-point-invalid-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-26：WorldToScreenPoint获取到的屏幕坐标异常（终端平台、GPU）",
      "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-26 - WorldToScreenPoint获取到的屏幕坐标异常”导航项",
      "citation": "https://www.pystone.net/notes/game-graphics-and-runtime/#%E6%88%91%E7%9A%84uwa%E9%97%AE%E7%AD%94"
    }
  ],
  "contentMarkdown": "# WorldToScreenPoint获取到的屏幕坐标异常\n\n> [!note] 我的 UWA 问答\n> 本文收录我在 UWA 问答发表的公开回答。问题内容归原提问者；回答保留当时语境，技术结论可能受 Unity 版本、平台和项目条件限制。\n\n## 问题\n\n![1.gif](assets/60acab5d6bb31032f979189d/01.gif)\n\n![20181220230428406.png](assets/60acab5d6bb31032f979189d/02.png)\n\n用Camera.WorldToScreenPoint做屏幕映射的时候发现一个问题，当摄像机有旋转的时候，当摄像机移动到特殊位置时，返回值vector3.z值会从正变为负，而且x或y值也会发生正负突变\n\n请教各位大神，这个该如何解决？\n\n- 提问者：路人甲\n- 提问时间：2021-05-25 23:46:37\n\n## 我的回答\n\n给个解决方案哈：\n\n![image.png](assets/60acab5d6bb31032f979189d/03.png)\n\n原理要自己慢慢悟了，不是BUG：相机的z轴方向上，物体在相机后面时，物体的坐标转换到裁剪空间后，x、y方向上，下面的会跑到上面，上面的会跑到下面。 想一下小孔成像的原理，或许能帮助理解。\n\n- 回答时间：2021-05-26 21:25:22\n- 最后更新：2021-05-28 08:45:03\n- 采纳状态：已采纳\n\n## 来源与关系\n\n- 上位集合：[[10-计算机、信息技术与工程/05-游戏图形与运行时/我的UWA问答/我的UWA问答|我的 UWA 问答]]\n- UWA 标签：终端平台、GPU\n- 原始问题：[WorldToScreenPoint获取到的屏幕坐标异常](https://answer.uwa4d.com/question/60acab5d6bb31032f979189d)\n- 源页最后更新：2022-10-19 04:24:05\n"
}
