ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2023ǯ09·î19Æü(²Ð) 14:50:24ÍúÎò
¡¡¼ê½ç£´¡Á£¸¤Ç¤Ï¥×¥ì¥¤¥ä¡¼¤Îʬ¿È¤È¤Ê¤ë¥¥ã¥é¤ÎºîÀ®¡¢¥¥ã¥é¤Î¹ÔÆ°¤È¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ÎÀ©¸æ¤Ë¤Ä¤¤¤Æ¼ÂÁõ¤ò¹Ô¤¤¤Þ¤¹¡£
¡¡¤³¤Î¼ê½ç¤Ç¤Ï¡¢¿·¤·¤¯¥¸¥ã¥ó¥×ÍѤΥ¢¥Ë¥á¡¼¥·¥ç¥ó¤òºîÀ®¤·¤Þ¤¹¡£
¤Þ¤¿¥¥ã¥éÍѤΥ¹¥¯¥ê¥×¥È¤ò½¤Àµ¤·¡¢¥¥ã¥é¤ò¥¸¥ã¥ó¥×¤µ¤»¤¿¤ê¡¢¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ÈƱ´ü¤µ¤»¤ëÀ©¸æ¤ò¼ÂÁõ¤·¤Þ¤¹¡£
¼ê½ç£¶¡¡¡Ý¥¥ã¥é¤Î¥¸¥ã¥ó¥×¤Î¼ÂÁõ¡Ý
¡¡£¹¡¥¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤Æ¡¢¥¥ã¥é¤ò¥¸¥ã¥ó¥×¤µ¤»¤Æ¡¢¶õÃæÉâÍ·¤Ç¤¤ë¤è¤¦¤Ë¤¹¤ë
¡¡¥¥ã¥é¤ò¥¸¥ã¥ó¥×¤µ¤»¤ë¡¢¤È¤Ï¤É¤¦¤¤¤¦¤³¤È¤Ç¤·¤ç¤¦¡¢
¡¡Unity¤Î½èÍý¤È¤·¤Æ¹Í¤¨¤¿¾ì¹ç¡¢¡Ö¥¥ã¥é(¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È)¤Î°ÌÃÖ¤ò¾åÊý¸þ¤Ë°ÜÆ°¤µ¤»¤ë¡×¤È¤¤¤¦½èÍý¤Î¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
¤Ä¤Þ¤ê¡¢¾åÊý¸þ¤Ë°ÜÆ°¤µ¤»¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢¥¸¥ã¥ó¥×¤·¤Æ¤¤¤ë¤è¤¦¤Ë¥²¡¼¥à²èÌ̤Ǹ«¤»¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
¡¡
¡¡¤½¤Î¤¿¤á¤Ë¤Ï¡¢¥¸¥ã¥ó¥×¤ò¤·¤Æ¤¤¤ë¥¢¥Ë¥á¡¼¥·¥ç¥ó¤¬É¬Íפˤʤê¤Þ¤¹¡£¤Þ¤º¤Ï¡¢¤³¤Î¥¸¥ã¥ó¥×¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤òºîÀ®¤·¡¢Animator ¥Ó¥å¡¼¤Ç
¤É¤Î¤è¤¦¤Ê¾ò·ï¤Î»þ¤Ë¥¸¥ã¥ó¥×¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ËÁ«°Ü¤¹¤ë¤«¤òÀßÄꤷ¤Þ¤¹¡£
¡¡¤½¤Î¸å¡¢Àè¤Û¤ÉºîÀ®¤·¤¿ PlayerController ¥¹¥¯¥ê¥×¥È¤Ë½èÍý¤òÄɲ䷤ơ¢¤³¤Î¥¸¥ã¥ó¥×¤Î°ìÏ¢¤Î½èÍý(¥¥ã¥é¤ò¾åÊý¸þ¤Ë°ÜÆ°¤µ¤»¡¢¥¸¥ã¥ó¥×¤Î¥¢¥Ë¥áºÆÀ¸)¤ò¼ÂÁõ¤·¤Æ¤¤¤¤Þ¤¹¡£
¡¡Áö¤ë¥¢¥Ë¥á¡¼¥·¥ç¥ó¤äÂÔµ¡¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ÈƱ¤¸¤è¤¦¤Ë¡¢Ê£¿ô¤Î²èÁü¤ò¤Þ¤È¤á¤Æ¥Ò¥¨¥é¥ë¥¡¼¤Ë¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¡¢¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤òºîÀ®¤·¤Þ¤¹¡£
¡¡¥¸¥ã¥ó¥×¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤Ë¤Ï£³¤Ä¤Î¥Ñ¥¿¡¼¥ó¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤½¤ì¤¾¤ìƱ¤¸¥Õ¥¡¥¤¥ë̾¤Ç¤Þ¤È¤á¤Æ¡¢£³¤Ä¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤òºîÀ®¤·¤Þ¤¹¡£
¡¡¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤òºîÀ®¤¹¤ë¤È¼«Æ°Åª¤Ë AnimatorController ¥Õ¥¡¥¤¥ë¤âºîÀ®¤µ¤ì¤Þ¤¹¤¬¡¢¤³¤ì¤ÏºÇ½é¤ËºîÀ®¤µ¤ì¤¿ Run ¤Î AnimatorController ¥Õ¥¡¥¤¥ë¤·¤«ÍøÍѤ·¤Þ¤»¤ó¡£
¤½¤Î¤¿¤á¡¢¿·¤·¤¤¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤òºîÀ®¤µ¤ì¤¿»þ¤Ëºî¤é¤ì¤¿ AnimatorController ¤Ë¤Ä¤¤¤Æ¤Ïºï½ü¤·¡¢£±¤Ä¤À¤±(Run ¤Î¤â¤Î)»Ä¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡
¥Õ¥¡¥¤¥ë¤Î¾ì½ê¡¡¥Õ¥¡¥¤¥ë¤Î¾ì½ê¡¡Assets/UnityChan/2DUnitychan/Sprites/Yuko/Yuko_Jump_Up_1 ¤«¤é Yuko_Jump_Up_2 ¤Þ¤Ç¤Î£²¥Õ¥¡¥¤¥ë
¥Õ¥¡¥¤¥ë¤Î¾ì½ê¡¡¥Õ¥¡¥¤¥ë¤Î¾ì½ê¡¡Assets/UnityChan/2DUnitychan/Sprites/Yuko/Yuko_Jump_MidAir_1 ¤«¤é Yuko_Jump_MidAir_4 ¤Þ¤Ç¤Î£´¥Õ¥¡¥¤¥ë
¥Õ¥¡¥¤¥ë¤Î¾ì½ê¡¡¥Õ¥¡¥¤¥ë¤Î¾ì½ê¡¡Assets/UnityChan/2DUnitychan/Sprites/Yuko/Yuko_Jump_Fall_1 ¤«¤é Yuko_Jump_Fall_3 ¤Þ¤Ç¤Î£³¥Õ¥¡¥¤¥ë
¡¡¤³¤ì¤é¤ò½çÈ֤˥ҥ¨¥é¥ë¥¡¼¤Ë¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¡¢¤½¤ì¤¾¤ì¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤òºîÀ®¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡¤Ê¤ª¾åµ¤Î¥Õ¥¡¥¤¥ë¤Ï Yuko ¤ò¥¥ã¥é¥¯¥¿¡¼¤ËÁªÂò¤·¤Æ¤¤¤ë¾ì¹ç¤Î¥Õ¥¡¥¤¥ë¤Ç¤¹¡£
Ŭµ¹¡¢¼«Ê¬¤Î»ÈÍѤ·¤Æ¤¤¤ë¥¥ã¥é¥¯¥¿¡¼¤Î¥Õ¥¡¥¤¥ë¤òÍøÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Î㤨¤Ð¡¢Cindy ¤Î¾ì¹ç¡¢Fall ¤Î¥¢¥Ë¥á¤Ë¡¢Íî²¼¾õÂ֤ΤߤǤϤʤ¯¡¢ÃåÃÏ»þ¤Î¥¢¥Ë¥á¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¤è¤¦¤Ê¥±¡¼¥¹¤â¤¢¤ê¤Þ¤¹¡£
º£²óÀ©ºî½èÍý¤Ç¤Ï¡¢Íî²¼¥¢¥Ë¥á¤Î¾ì¹ç¡¢ÃÏÌ̤ËÃ夯Á°¤ÏÍî²¼¾õÂ֤Υ¢¥Ë¥á¤ò·«¤êÊÖ¤¹·Á¤Ë¤·¤¿¤¤¤¿¤á¡¢ÃåÃÏ»þ¤Î¥¢¥Ë¥á¤¬Æþ¤ë¤È¥¢¥Ë¥á¤È²èÌ̤εóÆ°¤¬¤Á¤°¤Ï¤°¤ËÌĤê¤Þ¤¹¡£
¤½¤Î¾ì¹ç¤Ë¤Ï£²¤Ä¤Î¥Õ¥¡¥¤¥ë¤«¤éÍî²¼¥¢¥Ë¥á¤òºîÀ®¤¹¤ë¤Ê¤É¡¢²èÁü¤Î¾õÂÖ¤ò¸«¤Æ¥¢¥Ë¥á¤ËÍøÍѤ¹¤ë²èÁü¤ÎȽÃǤò¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤Î̾¾Î¤Ï¡¢¥Õ¥¡¥¤¥ë̾¤«¤é Jump_Up(¤¢¤ë¤¤¤Ï Up)¡¢Jump_MidAir(¤¢¤ë¤¤¤Ï Mid)¡¢Jump_Fall(¤¢¤ë¤¤¤Ï Fall) ¤Î¤è¤¦¤Ë¡¢
¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ÎÆâÍƤ¬¤ï¤«¤ê¤ä¤¹¤¤Ì¾¾Î¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤òºîÀ®¤·¤¿¤é¡¢¥Ò¥¨¥é¥ë¥¡¼¤Ë¿·¤·¤¯ºîÀ®¤µ¤ì¤¿¤³¤ì¤é¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤Ï£³¤Ä¤È¤âºï½ü¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡¥Ò¥¨¥é¥ë¥¡¼¤Ç Yuko_Player ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤¿¾õÂ֤ǡ¢Scene¥Ó¥å¡¼¤«¤é Animator¥Ó¥å¡¼¤ËÀÚ¤êÂؤ¨¤Æ¤¯¤À¤µ¤¤¡£
Àè¤Û¤ÉºîÀ®¤·¤¿ Animator ¤Î¾ðÊó¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£É½¼¨¤µ¤ì¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢Yuko_Player ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Ê¤¤¾õÂ֤Ǥ¹¤Î¤Ç
°ìÅÙ¡¢Scene¥Ó¥å¡¼¤ËÌá¤ê¡¢ºÆÅÙ Yuko_Player ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¤«¤é¡¢¥¿¥Ö¤ò Animator¥Ó¥å¡¼¤ËÀÚ¤êÂؤ¨¤Æ¤¯¤À¤µ¤¤¡£
Animator¥Ó¥å¡¼²èÁü
¡¡¥¸¥ã¥ó¥×¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤òºîÀ®¤·¤Þ¤·¤¿¤Î¤Ç¡¢¤½¤ì¤ò¤³¤ÎAnimator¥Ó¥å¡¼¤ËÅÐÏ¿¤·¤Æ¡¢Á«°Ü¤¬¹Ô¤¨¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¡¡ºîÀ®¤·¤¿ Jump_Up(Up)¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤Î¥Õ¥¡¥¤¥ë¤ò¡¢Animator¥Ó¥å¡¼¤Ø¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¤¯¤À¤µ¤¤¡£
¿·¤·¤¯¡¢Æ±Ì¾¤Î¥¹¥Æ¡¼¥È¤¬£±¤ÄÄɲ䵤ì¤Þ¤¹¡£
¡¡Æ±¤¸¼ê½ç¤Ç¡¢Jump_MidAir ¤È Jump_Fall ¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¤â¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤·¤Æ¡¢¥¹¥Æ¡¼¥È¤òºîÀ®¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¢¥Ë¥á¡¼¥·¥ç¥ó¥¯¥ê¥Ã¥×¥Õ¥¡¥¤¥ë¤ò¡¢Animator¥Ó¥å¡¼¤Ø¥É¥é¥Ã¥°¥¢¥ó¥É¥É¥í¥Ã¥×¤¹¤ë
¡ã¼ê½çÆ°²è¡ä
https://gyazo.com/8bbcd17f6f7a42f988dbe6414679b9e2
¡¡
¡¡Äɲä·¤¿¤é¡¢Á«°ÜÍѤÎÌð°õ¡Ê¥È¥é¥ó¥¸¥·¥ç¥ó¡Ë¤¬¤Ä¤±¤ä¤¹¤¤¤è¤¦¤Ë¡¢£³¤Ä¤òʤ٤Ƥª¤¤¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¤è¤¦¤ËÁ«°Ü¤µ¤»¤ë¤è¤¦¤Ë¤·¤Þ¤¹¤Î¤Ç¡¢»²¹Í¤ËÇÛÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£(Ìð°õ¤Ï¸å¤ÇÀßÄꤷ¤Þ¤¹¤Î¤Ç¡¢Ìð°õ¤¬¤Ä¤±¤ä¤¹¤¤¤è¤¦¤Ë¥¹¥Æ¡¼¥È¤Î°ÌÃÖ´Ø·¸¤À¤±»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£)
Animator¥Ó¥å¡¼¡¡¥¹¥Æ¡¼¥È¿Þ
¡¡Animator¥Ó¥å¡¼¤Îº¸Â¦¤Ë¤¢¤ë Parameters ¤Ë¡¢¿·¤·¤¤¾ò·ï¤ò£²¤ÄÅÐÏ¿¤·¡¢¥¢¥Ë¥á¡¼¥·¥ç¥óÁ«°Ü¤Î¾ò·ï¤È¤·¤ÆÀßÄê½ÐÍè¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
¡¡Parameters ¤Î±¦Â¦¤Ë¤¢¤ë¥×¥é¥¹¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢Trigger ·¿¤Î¾ò·ï¤ò£²¤ÄÄɲä·¤Þ¤¹¡££±¤Ä¤Ï Jump¡¢¤â¤¦£±¤Ä¤Ï Fall ¤È¤¤¤¦Ì¾Á°¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
Trigger ·¿¤Î¾ì¹ç¡¢Ì¾Á°¤Î±¦Â¦¤Ë ´Ý¤¤¥¢¥¤¥³¥ó¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
Trigger ·¿¤Î Jump ¥Ñ¥é¥á¡¼¥¿
Trigger ·¿¤Î Fall ¥Ñ¥é¥á¡¼¥¿
¡¡ºîÀ®¤·¤¿¥Ñ¥é¥á¡¼¥¿¤ò»È¤Ã¤Æ¡¢¤½¤ì¤¾¤ì¤ÎÁ«°Ü¤È¾ò·ï¤òÀßÄꤷ¤Æ¤¤¤¤Þ¤¹¡£
¡¡¤Þ¤ººÇ½é¤Ë AnyState ¤È¤¤¤¦¥¹¥Æ¡¼¥È¤òÁªÂò¤·¡¢±¦¥¯¥ê¥Ã¥¯¤ò¤·¤Æ¥á¥Ë¥å¡¼¤ÎÃ椫¤é Make Transition ¤òÁªÂò¤·¤Þ¤¹¡£
Çò¤¤Ìð°õ¤¬ AnyState ¤«¤éɽ¼¨¤µ¤ì¤Þ¤¹¤Î¤Ç¡¢Jump_Up ¥¹¥Æ¡¼¥È¤Ø¤Ä¤Ê¤²¤Æº¸¥¯¥ê¥Ã¥¯¤ò²¡¤·¤Þ¤¹¡£
¡¡¤³¤ÎÌð°õ¡Ê¥È¥é¥ó¥¸¥·¥ç¥ó¡Ë¤òÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤«¤éÁ«°Ü¾ò·ï¤òÀßÄꤷ¤Þ¤¹¡£
AntyState => Jump_Up(Up)¡¡Animator¥Ó¥å¡¼²èÁü
¡¡Has Exit Time ¤Î¥Á¥§¥Ã¥¯¤ò³°¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Consitions ¤Ë¤Ï ¥×¥é¥¹¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢Jump ¥Ñ¥é¥á¡¼¥¿¤òÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
AntyState => Jump_Up(Up)¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡Â³¤¤¤Æ¡¢Jump_Up ¥¹¥Æ¡¼¥È¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤ò¤·¡¢Make Transition ¤òÁªÂò¤·¤Þ¤¹¡£
Jump_Mid ¥¹¥Æ¡¼¥È¤Ø¤Ä¤Ê¤²¤Æº¸¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ÎÉôʬ¤ÏÆäËÀßÄê¤ÏÉÔÍפǤ¹¤Î¤Ç¡¢²¼µ¤Î²èÁü¤ò»²¹Í¤Ë¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î³Îǧ¤À¤±¤·¤Æ¤¯¤À¤µ¤¤¡£
Jump_Up => Jump_Mid¡¡Animator¥Ó¥å¡¼²èÁü
Jump_Up => Jump_Mid¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡¼¡¤Ï¡¢Jump_Mid ¥¹¥Æ¡¼¥È¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤ò¤·¡¢Make Transition ¤òÁªÂò¤·¤Þ¤¹¡£
Jump_Fall ¥¹¥Æ¡¼¥È¤Ø¤Ä¤Ê¤²¤Æº¸¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ÎÉôʬ¤âÀßÄê¤ÏÉÔÍפǤ¹¤Î¤Ç¡¢²¼µ¤Î²èÁü¤ò»²¹Í¤Ë¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î³Îǧ¤À¤±¤·¤Æ¤¯¤À¤µ¤¤¡£
Jump_Mid => Jump_Fall¡¡Animator¥Ó¥å¡¼²èÁü
Jump_Mid => Jump_Fall¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡¤â¤¦°ìÅÙ AnyState ¥¹¥Æ¡¼¥È¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤ò¤·¡¢Make Transition ¤òÁªÂò¤·¤Þ¤¹¡£
Jump_Fall ¥¹¥Æ¡¼¥È¤Ø¤Ä¤Ê¤²¤Æº¸¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£Æ±¤¸¤è¤¦¤ËÌð°õ¤òÁªÂò¤·¤Æ¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤«¤éÀßÄê¤ò¹Ô¤¤¤Þ¤¹¡£
AnyState => Jump_Fall¡¡Animator¥Ó¥å¡¼²èÁü
¡¡Has Exit Time ¤Î¥Á¥§¥Ã¥¯¤ò³°¤·¤Æ¤¯¤À¤µ¤¤¡£
¡¡Consitions ¤Ë¤Ï ¥×¥é¥¹¥Ü¥¿¥ó¤ò²¡¤·¤Æ¡¢Fall ¥Ñ¥é¥á¡¼¥¿¤òÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
AnyState => Jump_Fall¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡ºÇ¸å¤Ç¤¹¡£Jump_Fall ¥¹¥Æ¡¼¥È¤òÁªÂò¤·¤Æ±¦¥¯¥ê¥Ã¥¯¤ò¤·¡¢Make Transition ¤òÁªÂò¤·¤Þ¤¹¡£
Exit ¥¹¥Æ¡¼¥È¤Ø¤Ä¤Ê¤²¤Æº¸¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ÎÉôʬ¤ÏÀßÄê¤ÏÉÔÍפǤ¹¤Î¤Ç¡¢²¼µ¤Î²èÁü¤ò»²¹Í¤Ë¡¢¥¤¥ó¥¹¥Ú¥¯¥¿¡¼¤Î³Îǧ¤À¤±¤·¤Æ¤¯¤À¤µ¤¤¡£
Jump_Fall => Exit¡¡Animator¥Ó¥å¡¼²èÁü
Jump_Fall => Exit¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡°Ê¾å¤Î¼ê½ç¤Ç´°À®¤Ç¤¹¡£
´°À®¿Þ
Animator¥Ó¥å¡¼¡¡Á´ÂοÞ
¡¡¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ËʪÍýŪ¤ÊÎϤò²Ã¤¨¤ë¥á¥½¥Ã¥É¤Ç¤¹¡£
ÎϤòÍ¿¤¨¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢ÊªÍý±é»»¤Ë¤Î¤Ã¤È¤Ã¤Æ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ò°ÜÆ°¤µ¤»¤ë½èÍý¤¬¹Ô¤¨¤Þ¤¹¡£
Rigidbody2D.AddForce (Vector2 force, ForceMode2D mode= ForceMode2D.Force)
¡¡// ¥¥ã¥é¤Î°ÌÃÖ¤ò¾åÊý¸þ¤Ø°ÜÆ°¤µ¤»¤ë(¥¸¥ã¥ó¥×¡¦ÉâÍ·) rb.AddForce(transform.up * jumpPower);
¡¡Âè1°ú¿ô¤Ë¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤ËÍ¿¤¨¤ëÎϤÎÃͤòÀßÄꤷ¤Þ¤¹¡£Âè2°ú¿ô¤ÏÎϤÎÍ¿¤¨Êý¤ËÂФ¹¤ë¥ª¥×¥·¥ç¥óÃͤǤ¹¡£½é´üÃÍ¤Ç Force ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£
Rigidbody2D¤Î¾ì¹ç¤Ë¤Ï¡¢ForceMode¤Ï2¼ïÎढ¤ê¤Þ¤¹¡£ÎϤÎÃͤòÊѹ¹¤¹¤ë¤È¤É¤¦¤Ê¤ë¤«¡¢Âè2°ú¿ô¤ÎÀßÄê¤òÊѹ¹¤¹¤ë¤È¤É¤¦¤Ê¤ë¤«¤Ê¤É¡¢
¼«Ê¬¤ÇÄ´¤Ù¤Æ¡¢¥¹¥¯¥ê¥×¥È¤ËÂåÆþ¤·¡¢°ã¤¤¤ò³Îǧ¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£
»²¹Í¥µ¥¤¥È
Unity¸ø¼°¥¹¥¯¥ê¥×¥È¥ê¥Õ¥¡¥ì¥ó¥¹
Rigidbody2D.AddForce
https://docs.unity3d.com/ja/current/ScriptReferenc...
Unity¸ø¼°¥¹¥¯¥ê¥×¥È¥ê¥Õ¥¡¥ì¥ó¥¹
ForceMode2D
https://docs.unity3d.com/ja/current/ScriptReferenc...
SamuraiBlogÍÍ
¡ÚUnityÆþÌç¡ÛRigidbody¤Ç¼«ºß¤Ë°ÜÆ°!addforce¤äposition¤ò¶Ë¤á¤è¤¦!
https://www.sejuku.net/blog/54896
¡¡¥¸¥ã¥ó¥×¤¹¤ëºÝ¤Î¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ÎÁ«°Ü¤Î¤¿¤á¤Ë¡¢SetTrigger¥á¥½¥Ã¥É¤òÍøÍѤ·¡¢Á«°Ü¤Î¾ò·ï¤ò¤³¤Î¥á¥½¥Ã¥É¤Î°ú¿ô¤Ë»ØÄꤷ¤Æ¥¢¥Ë¥á¡¼¥·¥ç¥ó¤ÎÁ«°Ü¤ò¹Ô¤Ã¤Æ¤¤¤Þ¤¹¡£
¡¡// Jump(Up + Mid) ¥¢¥Ë¥á¡¼¥·¥ç¥ó¤òºÆÀ¸¤¹¤ë ¡¡anim.SetTrigger("Jump");
Unity¸ø¼°¥¹¥¯¥ê¥×¥È¥ê¥Õ¥¡¥ì¥ó¥¹
SetTrigger
https://docs.unity3d.com/ja/current/ScriptReferenc...
¡¡¥¹¥¯¥ê¥×¥È¤Î½¤Àµ¤¬½ªÎ»¤·¤¿¤é¡¢Yuko_Player ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¤òÁªÂò¤·¤Æ¡¢¿·¤·¤¯Äɲä·¤¿ jumpPower ÊÑ¿ô¤ÎÃͤòÅÐÏ¿¤·¤Þ¤¹¡£
0 ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢ 300 ¤òÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ÎÃͤ¬ 0 ¤Î¤Þ¤Þ¤Ç¤Ï¥¸¥ã¥ó¥×¤·¤Þ¤»¤ó¡£(¤³¤ÎÃͤòÍøÍѤ¹¤ë·×»»¼°¤ò³Îǧ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£)
Yuko_Player ¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥È¡¡¥¤¥ó¥¹¥Ú¥¯¥¿¡¼²èÁü
¡¡¥²¡¼¥à¤ò¼Â¹Ô¤·¤Æ¡¢¥¹¥Ú¡¼¥¹¥¡¼¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£¥¸¥ã¥ó¥×¤¹¤ì¤ÐÀ®¸ù¤Ç¤¹¡£¥¸¥ã¥ó¥×Ãæ¤Ç¤â¥¸¥ã¥ó¥×¤Ç¤¤Þ¤¹¤Î¤Ç¡¢¶õÃæÉâÍ·¤ò¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£
¡ã¼Â¹ÔÆ°²è¡ä
https://gyazo.com/7ffddb2c86ac207c8f351206162ffef3
¡¡¥¸¥ã¥ó¥×½ÐÍè¤Þ¤·¤¿¤é¡¢¼¡¤Î¼ê½ç¤Ø¿Ê¤ß¤Þ¤¹¡£¤â¤·¤â¥¸¥ã¥ó¥×¤¬½ÐÍè¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¥¹¥¯¥ê¥×¥È¤Ëµ½Ò¥ß¥¹¤¬¤Ê¤¤¤«³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
¥¸¥ã¥ó¥×¤Ï¤Ç¤¤ë¤â¤Î¤Î¡¢¥¢¥Ë¥á¡¼¥·¥ç¥ó¤¬ºÆÀ¸¤µ¤ì¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢Animator¤ÎÀßÄê¤È¥¹¥¯¥ê¥×¥È¤ÎξÊý¤ò½çÈ֤˸«Ä¾¤·¤Æ¡¢ÌäÂêÅÀ¤ò¸«¤Ä¤±¤Æ¤¯¤À¤µ¤¤¡£
¡¡°Ê¾å¤Ç¤³¤Î¼ê½ç¤Ï½ªÎ»¤Ç¤¹¡£
¡¡¼¡¤Ï¡¡¼ê½ç£·¡¡¡Ý¥¥ã¥é¤Î¥¸¥ã¥ó¥×¤Î²þÁ±¡Ý¡¡¤Ç¤¹¡£
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- ¥×¥í¥°¥é¥ß¥ó¥°
¥³¥á¥ó¥È¤ò¤«¤¯