{"id":3638,"date":"2019-07-08T13:59:49","date_gmt":"2019-07-08T04:59:49","guid":{"rendered":"https:\/\/nantoka.filmm.info\/blog\/?p=3638"},"modified":"2019-07-08T14:40:20","modified_gmt":"2019-07-08T05:40:20","slug":"maya-unity2019%ef%bc%882%ef%bc%89","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=3638","title":{"rendered":"Maya->Unity2019\uff082\uff09"},"content":{"rendered":"<h3>\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>&nbsp;<\/p>\n<ol>\n<li>\u30ad\u30e3\u30e9\u30af\u30bf\u3092\u64cd\u4f5c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059<\/li>\n<li>\u30a2\u30bb\u30c3\u30c8\u5185\u3067<strong>\u53f3\u30af\u30ea\u30c3\u30af\uff1eCreate\uff1eC# Script<\/strong>\u3092\u9078\u629e<\/li>\n<li>\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u3000chair\u3000\u306b\u3059\u308b<\/li>\n<li>\u4f5c\u6210\u3055\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u958b\u304f\uff08Visual Studio\u306a\u3069\u304c\u958b\u304f\uff09<\/li>\n<li>\u5168\u90e8\u3092\u4ee5\u4e0b\u306b\u5165\u308c\u66ff\u3048\uff0c\u4fdd\u5b58\u3059\u308b<\/li>\n<\/ol>\n<pre class=\"lang:c# decode:true \" title=\"chair\">using System.Collections;\r\nusing System.Collections.Generic;\r\nusing UnityEngine;\r\n\r\npublic class chair : MonoBehaviour\r\n{\r\n    CharacterController characterController;\r\n\r\n    public float speed = 2f;\r\n    public float jumpSpeed = 3f;\r\n    public float gravity = 9.8f;\r\n\r\n    private Vector3 moveDirection = Vector3.zero;\r\n\r\n    void Start()\r\n    {\r\n        characterController = GetComponent&lt;CharacterController&gt;();\r\n    }\r\n\r\n    void Update()\r\n    {\r\n        if (characterController.isGrounded)\r\n        {\r\n            moveDirection = new Vector3(Input.GetAxis(\"Horizontal\"), 0.0f, Input.GetAxis(\"Vertical\"));\r\n            moveDirection *= speed;\r\n\r\n            if (Input.GetKey(KeyCode.Space))\r\n            {\r\n                moveDirection.y = jumpSpeed;\r\n            }\r\n\r\n        }\r\n        moveDirection.y -= gravity * Time.deltaTime;\r\n        characterController.Move(moveDirection * Time.deltaTime);\r\n    }\r\n}<\/pre>\n<ol>\n<li>\u6905\u5b50\u3092\u9078\u3073\uff0c<strong>Add Component<\/strong>\u304b\u3089<strong>Character Controller<\/strong>\u3092\u63a2\u3057\u51fa\u3057\u8ffd\u52a0\u3059\u308b<a href=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk18.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3657\" src=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk18.jpg\" alt=\"\" width=\"352\" height=\"262\" srcset=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk18.jpg 404w, https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk18-300x224.jpg 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><\/a><\/li>\n<li><strong>Character Controller<\/strong>\u306e\u8a2d\u5b9a\u9805\u76ee\u3067Collider\uff08\u885d\u7a81\u7528\u7c21\u6613\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u306e\u5927\u304d\u3055\u3092\u8abf\u6574\u3057\uff0c\u5e8a\u9762\u306b\u3081\u308a\u8fbc\u307e\u306a\u3044\u3088\u3046\u306b\u3059\u308b\uff08\u7dd1\u8272\u306e\u30ab\u30d7\u30bb\u30eb\u306e\u5927\u304d\u3055\u3092\u8abf\u6574\u3059\u308b\uff09<a href=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk23.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3656\" src=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk23.jpg\" alt=\"\" width=\"364\" height=\"248\" srcset=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk23.jpg 906w, https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk23-300x204.jpg 300w, https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk23-768x523.jpg 768w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/><\/a><\/li>\n<li>\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f<strong>chair<\/strong>\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u6905\u5b50\u306b\u8ffd\u52a0\u3059\u308b<br \/>\n<a href=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk20.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3643\" src=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk20.jpg\" alt=\"\" width=\"410\" height=\"243\" srcset=\"https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk20.jpg 1106w, https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk20-300x178.jpg 300w, https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk20-768x456.jpg 768w, https:\/\/nantoka.filmm.info\/blog\/wp-content\/uploads\/2019\/07\/walk20-1024x607.jpg 1024w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/a><\/li>\n<\/ol>\n<p><a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=3646\">\u3064\u304e\u3078<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3059\u308b &nbsp; \u30ad\u30e3\u30e9\u30af\u30bf\u3092\u64cd\u4f5c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059 \u30a2\u30bb\u30c3\u30c8\u5185\u3067\u53f3\u30af\u30ea\u30c3\u30af\uff1eCreate\uff1eC# Script\u3092\u9078\u629e \u30d5\u30a1\u30a4\u30eb\u540d\u306f\u3000chair\u3000\u306b\u3059\u308b \u4f5c\u6210\u3055\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u958b\u304f\uff08Visual  &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=3638\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Maya->Unity2019\uff082\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-3638","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\/3638","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=3638"}],"version-history":[{"count":14,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3638\/revisions"}],"predecessor-version":[{"id":3670,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3638\/revisions\/3670"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}