{"id":3675,"date":"2019-07-15T13:25:45","date_gmt":"2019-07-15T04:25:45","guid":{"rendered":"https:\/\/nantoka.filmm.info\/blog\/?p=3675"},"modified":"2019-07-15T15:43:41","modified_gmt":"2019-07-15T06:43:41","slug":"maya-unity2019%ef%bc%884%ef%bc%89","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=3675","title":{"rendered":"Maya->Unity2019\uff084\uff09"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h3>\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u9069\u7528<\/h3>\n<p>chair.cs\u306f\u524a\u9664\u3057\u307e\u3059\uff0e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u9078\u629e\u3057\uff0cchair\u306e\u6b6f\u8eca\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089remove component\u3092\u9078\u629e\u3057\u3066\u524a\u9664\u3057\u307e\u3059\uff0e<a href=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/remove.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3685\" src=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/remove.jpg\" alt=\"\" width=\"573\" height=\"162\" srcset=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/remove.jpg 573w, https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/remove-300x85.jpg 300w\" sizes=\"auto, (max-width: 573px) 100vw, 573px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u6b21\u306b\uff0c\u56de\u8ee2\u306b\u5bfe\u5fdc\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3059\u308b\uff0e\u30d5\u30a1\u30a4\u30eb\u540d\u306fmove1.cs<\/p>\n<pre class=\"lang:default decode:true \" title=\"move.cs\">using System.Collections;\r\nusing System.Collections.Generic;\r\nusing UnityEngine;\r\n\r\n[RequireComponent(typeof(CharacterController))]\r\npublic class move1 : MonoBehaviour\r\n{\r\n\r\n\tpublic float speed = 3.0F;\r\n\tpublic float rotateSpeed = 3.0F;\r\n\tpublic float gravity = 10f;\r\n\tpublic float jumpPower = 5;\r\n\r\n\tprivate Vector3 moveDirection;\r\n\tprivate CharacterController controller;\r\n\r\n\tvoid Start()\r\n\t{\r\n\r\n\t\t\/\/ \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u53d6\u5f97\r\n\t\tcontroller = GetComponent&lt;CharacterController&gt;();\/\/\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u53d6\u5f97\u3057\uff0c\u5909\u6570contorller\u306b\u53ce\u7d0d\r\n\r\n\t}\r\n\r\n\tvoid Update()\r\n\t{\r\n\r\n\t\tif (controller.isGrounded)\/\/\u63a5\u5730\u3057\u3066\u3044\u308c\u3070\r\n\t\t{\r\n\r\n\t\t\t\/\/ \u56de\u8ee2\r\n\t\t\ttransform.Rotate(0, Input.GetAxis(\"Horizontal\") * rotateSpeed, 0);\r\n\r\n\t\t\t\/\/ \u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u306e\u30ed\u30fc\u30ab\u30eb\u7a7a\u9593\u3067\u306e\u65b9\u5411\r\n\t\t\tmoveDirection = transform.transform.forward * speed * Input.GetAxis(\"Vertical\");\r\n\r\n\t\t\t\/\/ \u30b8\u30e3\u30f3\u30d7\r\n\t\t\tif (Input.GetButtonDown(\"Jump\")) moveDirection.y = jumpPower;\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\r\n\t\t\t\/\/ \u30b8\u30e3\u30f3\u30d7\u843d\u4e0b\r\n\t\t\tmoveDirection.y -= gravity * Time.deltaTime;\r\n\r\n\t\t}\r\n\r\n\t\t\/\/\u79fb\u52d5\u3055\u305b\u308b\r\n\t\tcontroller.Move(moveDirection * Time.deltaTime);\r\n\r\n\t}\r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30a4\u30b9\u306e\u30e2\u30c7\u30eb\u306b\u30a2\u30b5\u30a4\u30f3\u3057\u307e\u3059\uff0e<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u9069\u7528 chair.cs\u306f\u524a\u9664\u3057\u307e\u3059\uff0e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u9078\u629e\u3057\uff0cchair\u306e\u6b6f\u8eca\u306e\u30a2\u30a4\u30b3\u30f3\u304b\u3089remove component\u3092\u9078\u629e\u3057\u3066\u524a\u9664\u3057\u307e\u3059\uff0e &nbsp; \u6b21\u306b\uff0c\u56de\u8ee2\u306b\u5bfe\u5fdc\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3059 &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=3675\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Maya->Unity2019\uff084\uff09<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,13,2],"tags":[],"class_list":["post-3675","post","type-post","status-publish","format-standard","hentry","category-3dcg","category-c","category-unity"],"_links":{"self":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3675"}],"version-history":[{"count":17,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3675\/revisions"}],"predecessor-version":[{"id":3694,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3675\/revisions\/3694"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}