{"id":1786,"date":"2020-04-18T08:46:14","date_gmt":"2020-04-18T00:46:14","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=1786"},"modified":"2020-04-18T08:46:14","modified_gmt":"2020-04-18T00:46:14","slug":"unity%e8%87%aa%e5%8a%a8%e6%8b%bc%e6%8e%a5%e5%9c%b0%e5%9e%8b%e6%9d%bf%e5%9d%97","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=1786","title":{"rendered":"[Unity]\u81ea\u52a8\u62fc\u63a5\u5730\u578b\u677f\u5757"},"content":{"rendered":"\n<p>\u5728\u624b\u6e38\u4e2d\u53ef\u4ee5\u4f7f\u7528Unity\u7684terrain\u7cfb\u7edf\uff0c\u4e0d\u8fc7\u6548\u7387\u5f53\u524d\u5e76\u4e0d\u7406\u60f3\uff0c\u8fd8\u6709\u4e00\u79cd\u65b9\u5f0f\u662f\u81ea\u5df1\u505a\u5730\u5757\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u7f8e\u672f\u9884\u5236\u4f5c\u4e00\u7cfb\u5217Prefab\uff0c\u7136\u540e\u5728\u6bcf\u4e2a\u5730\u5757\u7684\u8854\u63a5\u5904\u6253\u4e0a\u8854\u63a5\u70b9\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u7a0b\u5e8f\u6839\u636e\u8fdb\u5165\u70b9\u548c\u9000\u51fa\u70b9\u81ea\u52a8\u62fc\u63a5<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/blog.coolcoding.cn\/wp-content\/uploads\/2020\/04\/img_5e9a4dd6d23b2.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u4ee5\u4e0b\u4e3a\u5b9e\u73b0\uff1a\u8bbe\u6709\u8fdb\u5165\u548c\u9000\u51fa2\u4e2a\u5757\u677f<\/p>\n\n\n\n<p>1\u3001\u632a\u52a8\u8fdb\u5165\u677f\u5757\uff0c\u5c06\u8fdb\u5165\u677f\u5757\u4e0e\u9000\u51fa\u677f\u5757\u7684\u8854\u63a5\u70b9\u91cd\u5408\u3002<\/p>\n\n\n\n<p>&nbsp; \u5373\uff1aenter.pos += ( exit.pos &#8211; enter.pos)<\/p>\n\n\n\n<p>2\u3001\u65cb\u8f6c\u8fdb\u5165\u677f\u5757\uff0c\u4ee42\u4e2a\u677f\u5757\u7684\u8854\u63a5\u70b9\u7684\u65cb\u8f6c\u503c\u76f8\u540c\uff0c\u53cd\u7b97\u51fa\u8fdb\u5165\u677f\u5757\u7684\u65cb\u8f6c\u503c\u3002<\/p>\n\n\n\n<p>\u5373\uff1aenter.rotation = exitJointPoint.rotation * ( enter.rotation&#8217; &nbsp;* &nbsp;enterJointPoint.rotation) &#8216;<\/p>\n\n\n\n<p>\u6ce8\u610f\u4ee5\u4e0a\u53d6\u9006\u64cd\u4f5c(&#8216;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u624b\u6e38\u4e2d\u53ef\u4ee5\u4f7f\u7528Unity\u7684terrain\u7cfb\u7edf\uff0c\u4e0d\u8fc7\u6548\u7387\u5f53\u524d\u5e76\u4e0d\u7406\u60f3\uff0c\u8fd8\u6709\u4e00\u79cd\u65b9\u5f0f\u662f\u81ea\u5df1\u505a\u5730\u5757\u3002 \u9996\u5148\u7f8e\u672f\u9884\u5236 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1786"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1786"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1786\/revisions"}],"predecessor-version":[{"id":1788,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/1786\/revisions\/1788"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}