{"id":651,"date":"2017-03-28T00:52:10","date_gmt":"2017-03-27T15:52:10","guid":{"rendered":"http:\/\/naochang.me\/?p=651"},"modified":"2017-03-28T20:59:16","modified_gmt":"2017-03-28T11:59:16","slug":"%e5%9b%9e%e8%bb%a2","status":"publish","type":"post","link":"https:\/\/stacstar.jp\/blog\/?p=651","title":{"rendered":"\u56de\u8ee2"},"content":{"rendered":"<h3>Unity\u3067\u306e\u30aa\u30a4\u30e9\u30fc\u89d2<\/h3>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u3068Inspector\u306e\u89d2\u5ea6\u304c\u4e00\u81f4\u3057\u306a\u3044\u3068\u601d\u3063\u305f\u3089\u3001Unity\u5185\u3067\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u50be\u304d\u306fQuaternion\u3067\u4fdd\u6301\u3057\u3066\u3044\u308b\u306e\u3067\u30010-360\u5ea6\u306e\u7bc4\u56f2\u3092\u8d85\u3048\u308b\u60c5\u5831\u3068\u3044\u3046\u306e\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u3002<br \/>\n<a href=\"https:\/\/docs.unity3d.com\/jp\/540\/Manual\/QuaternionAndEulerRotationsInUnity.html\" target=\"_blank\">Unity\u306e\u30de\u30cb\u30e5\u30a2\u30eb\u306eUnity\u306e\u56de\u8ee2\u3068\u5411\u304d<\/a>\u306b\u3088\u308b\u3068\u3001365\u5ea6\u3068\u5165\u308c\u305f\u5834\u5408\u306f\u30015\u5ea6\u306b\u7f6e\u304d\u63db\u308f\u308b\u305f\u3081\u3001360\u5ea6+5\u5ea6\u3068\u3044\u3046\u60c5\u5831\u306f\u6d88\u3048\u3066\u3057\u307e\u3046\u3088\u3046\u3067\u3059\u3002<\/p>\n<h3>DOTween\u3067\u306e\u56de\u8ee2\u65b9\u5411<\/h3>\n<p>\u306a\u305c\u304bDOTween\u3092\u4f7f\u3063\u3066\u3001DORotateQuaternion\u3092\u3057\u305f\u969b\u306b\u300145\u306845\u00b1360\u3092\u5165\u308c\u305f\u969b\u306b\u56de\u8ee2\u65b9\u5411\u304c\u9006\u306b\u306a\u3063\u305f\u3002\u4e0a\u8a18\u3067\u3044\u3046\u3068\u3001360\u305a\u3089\u3057\u305f\u3082\u306e\u306f\u540c\u3058\u306f\u305a\u306a\u306e\u3067\u3001\u5411\u304d\u306a\u3069\u306a\u3044\u3088\u3046\u306a\u6c17\u3082\u3059\u308b\u3051\u3069\u3001\u3001\u3001<br \/>\nQuaternion\u304c\u8907\u96d1\u306a\u306e\u3067\u3069\u306e\u5834\u5408\u3067\u3082\u3053\u308c\u304c\u3067\u304d\u308b\u306e\u304b\u306f\u308f\u304b\u3089\u306a\u3044\u3051\u3069\u3001\u3068\u308a\u3042\u3048\u305a\u56de\u8ee2\u65b9\u5411\u3092\u5909\u3048\u305f\u3044\u5834\u5408\u306f360\u5ea6\u305a\u3089\u3057\u305f\u6570\u5024\u3092\u5165\u308c\u308b\u3068\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u56de\u8ee2\u3059\u308b\u969b\u306b\u306f1\u5ea6\u89d2\u5ea6\u30920-360\u306e\u7bc4\u56f2\u3067\u518d\u8a2d\u5b9a\u3057\u305f\u307b\u3046\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<h3>DOTween\u3067\u306e\u8907\u6570\u56de\u56de\u8ee2<\/h3>\n<p>\u8907\u6570\u56de\u56de\u8ee2\u3059\u308b\u306b\u306f\u3001720\u5ea6\u306a\u3069\u3068\u5165\u308c\u3066\u30822\u56de\u8ee2\u306f\u3057\u307e\u305b\u3093\u3002<br \/>\n\u305d\u3053\u3067\u3001SetLooks(int)\u3068RotateMode.FastBeyond360\u3092\u3064\u304b\u3063\u3066\u3001\u3084\u308d\u3046\u3068\u601d\u3044\u307e\u3057\u305f\u304c\u3001DORotate\u3067\u56de\u3059\u3068\u610f\u56f3\u3057\u306a\u3044\u56de\u308a\u65b9\u3092\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001OnComplete\u306b\u56de\u8ee2\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u518d\u5ea6\u547c\u3073\u51fa\u3057\u4efb\u610f\u306e\u56de\u6570\u3092\u3057\u305f\u3068\u3053\u308d\u3067\u629c\u3051\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: unitycsharp; title: ; notranslate\" title=\"\">\r\nTweenCallback RoundAction = null;\r\nfloat startRotateAngleX = trans.localEulerAngles.x;\r\n\r\nRoundAction = () =&gt; {\r\n\tif (++count &gt; 4) return;\r\n\r\n\tstartRotateAngleX += 180f;\r\n\ttrans.DOLocalRotateQuaternion(Quaternion.AngleAxis(startRotateAngleX, Vector3.right), 0.15f).SetEase(Ease.Linear).OnComplete(RoundAction);\r\n};\r\n\r\nRoundAction();\r\n<\/pre>\n<p>\u3093\u301c\u3001\u3053\u308c\u3060\u3068\u30a4\u30fc\u30b8\u30f3\u30b0\u304cLiner\u3067\u306a\u3044\u3068\u5909\u3060\u3057\u3001\u4e00\u77ac\u6b62\u307e\u308b\u306e\u3067\u306a\u3093\u304b\u3082\u3063\u3068\u3044\u3044\u65b9\u6cd5\u304c\u3042\u308b\u3088\u3046\u306a\u6c17\u304c\u3057\u307e\u3059\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unity\u3067\u306e\u30aa\u30a4\u30e9\u30fc\u89d2 \u30b9\u30af\u30ea\u30d7\u30c8\u3068Inspector\u306e\u89d2\u5ea6\u304c\u4e00\u81f4\u3057\u306a\u3044\u3068\u601d\u3063\u305f\u3089\u3001Unity\u5185\u3067\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u50be\u304d\u306fQuaternion\u3067\u4fdd\u6301\u3057\u3066\u3044\u308b\u306e\u3067\u30010-360\u5ea6\u306e\u7bc4\u56f2\u3092\u8d85\u3048\u308b\u60c5\u5831\u3068\u3044\u3046\u306e\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u3088\u3046\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-651","post","type-post","status-publish","format-standard","hentry","category-unity"],"_links":{"self":[{"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=651"}],"version-history":[{"count":7,"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":658,"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/651\/revisions\/658"}],"wp:attachment":[{"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stacstar.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}