Unity Asset Storeã®ãã©ã°ã€ã³ãäœæããã²ãŒã ã§ããç¥ãããŠããçå°ºæ§åé¡ã®è§£æ±ºã«é ãæã¡ãã³ãŒããŒã«ãéãæãããæ¹æ³ãUnityã«æ¡åŒµå¯èœãªãšãã£ã¿ãŒãããããšãç解ããæ¹æ³ã®ç©èªã ã«ããã®äžã®åçãå®è£ ãã°ã©ãã£ãã¯ã¹ãæèã
ãã¯ã¿ã€
ããã¯å€æ¹ã§ãããäœãããããšããããŸããã§ããã æ°å¹Žã¯ãããã°ã©ããŒã®ç掻ã«ãããŠç¹å¥ãªããšãåå ãšã¯ããŸããã§ããïŒå人ãšã¯ç°ãªããŸãããããã¯ãŸã£ããå¥ã®è©±ã§ãïŒã ç§ã®çœé«ªãæºãã¶ããå°ãªããšãå人çãã€èªåã®ãã®ãæžããšããã¢ã€ãã¢ã¯çæããå°ãªããšãããã€ãã®åæ¥çå©çãããç®æããŸããïŒéçšè ãé€ããŠå°ãªããšã誰ããããªãã®éçºãå¿ èŠãšããç§ã®éãæž©ããããïŒã ããã¯ãã¹ãŠãUnityãšãã£ã¿ãŒãæ¡åŒµãããšã³ãžã³æ¡åŒµæ©èœã販売ããããã®ãã©ãããã©ãŒã ãè©äŸ¡ããå¯èœæ§ãé·ãæãããã£ããšããäºå®ãšäžèŽããŸããã
ã¢ãã«ãã¹ã¯ãªãããããŸããŸãªãµãŒãã¹ãšã®çµ±åãè³ç£ä¿ç®¡è ã®ç 究ã®ããã«1æ¥ãå²ãåœãŠãŸãããäžèŠãããšããã¹ãŠããã§ã«ç°ãªãããŒãžã§ã³ã§ãç°ãªãäŸ¡æ ŒãšãµããŒãã§ãç°ãªãå質ã®å®è¡ãšéçºã§ããã§ã«æžãããçµ±åãããŠããããã«èŠããŸãã æ€çŽ¢ãããã«çµã蟌ã¿ãŸããïŒ
- ã³ãŒãã®ã¿ïŒããã°ã©ããŒãšããŠïŒ
- 2Dã®ã¿ïŒ2Dã倧奜ãã ãã+ Unityã®ãç®±ããåºããŠããã®æ£æ°ãªãµããŒããç»å Žããã°ããã ããïŒ
ãããŠãç§ã¯çå°ºæ§ã²ãŒã ãäœã£ããšãã«äœå¹ã®ãµããã³ãé£ã¹ãäœå¹ã®ããºããæ»ãã ããè¯ã解決çãèŠã€ããã®ã«ã©ãã ãã®æéãç¡é§ã«ãããããã®çå°ºæ§èªäœãåé¡ããŠæãè©Šã¿ã§ã©ãã ãã®ã³ããŒãå£ããããæãåºããŸããã éããåãããªããã圌ã¯ããŸããŸãªããŒã¯ãŒããæ€çŽ¢ããŸããããããŸãèšèã§ã¯ãªããã¢ã€ãœã¡ã§èžè¡ã®å±±ä»¥å€ã¯èŠãŸããã§ããã ããŠãã¢ã€ãœã¡å³çšã®ãã©ã°ã€ã³ããããšå€æãããŸããã
ç®æšèšå®
æåã«è¡ãå¿ èŠãããã®ã¯ããã®ãã©ã°ã€ã³ã解決ããåé¡ãšããããçå°ºæ§ã²ãŒã éçºè ã®ããŒãã¯ãŒã¯ã§ã©ã®ããã«åœ¹ç«ã€ããç°¡åã«èª¬æããããšã§ããã çå°ºæ§ã®åé¡ïŒ
- ãªããžã§ã¯ããæ£ããã¬ã³ããªã³ã°ã®ããã«è·é¢ã§ãœãŒããã
- ãšãã£ã¿ãŒã§çå°ºæ§ãªããžã§ã¯ããäœæãé 眮ã移åããããã®ãšãã£ã¿ãŒæ¡åŒµæ©èœ
æåã®ããŒãžã§ã³ã®äž»ãªã¿ã¹ã¯ãèšå®ãããŸãããæåã®ãã©ããããŒãžã§ã³ã®ç· ãåãã¯2ã3æ¥ã§ããã é ãããããšã¯äžå¯èœã§ãããç±æã¯å£ãããããã®ã§ãããæåã®æ¥ã«æºåãã§ããŠããªããã°ãç°¡åã«å°ç¡ãã«ãªããŸãã ãããŠãæ°å¹Žã®ç¥æ¥ã¯èŠããã»ã©é·ãã¯ãããŸããããæåã®ããŒãžã§ã³ãå ¬éããæéãèšããããšæããŸãã
ä»åã
ç°¡åã«èšãã°ãã¢ã€ãœã¡ããªã¯2Dã¹ãã©ã€ãã«ãã3Dã¢ãã«ã®ããã«èŠããããã®è©Šã¿ã§ãããããŸããŸãªçš®é¡ã®åé¡ã«å€æãããŸãã äž»ãªåé¡ã¯ãã¹ãã©ã€ãã誀ã£ãçžäºãªãŒããŒã©ãããåé¿ããããã«ãæç»ãããé åºã§äžŠã¹æ¿ããããå¿ èŠãããããšã§ãã
ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ãæåã«ç·ã®ã¹ãã©ã€ãïŒ2,1ïŒãæç»ããã次ã«éã®ã¹ãã©ã€ãïŒ1,1ïŒãæç»ãããŸã
ã¹ã¯ãªãŒã³ã·ã§ããã¯ãæåã«éãæããããšãã«ééã£ã䞊ã¹æ¿ãã瀺ããŠããŸã
ãã®åçŽãªå Žåã®ãœãŒãã¯é£ãããããŸãããããšãã°ã次ã®ãããªããŸããŸãªãªãã·ã§ã³ããããŸãã
- ç»é¢äœçœ®Yã§ãœãŒãããŸããããã¯ã ïŒisoX + isoYïŒ* 0.5 + isoZã§ãã
- å·Šããå³ãäžããäžãžæãé ãçå°ºæ§ã»ã«ããæç»ããŸã[ïŒ3,3ïŒãïŒ2,3ïŒãïŒ3,2ïŒãïŒ1,3ïŒãïŒ2,2ïŒãïŒ3,1ïŒã ...]
- ãããŠãå€ãã®èå³æ·±ãæ¹æ³ã§ãããŸãããã§ã¯ãããŸãã
ãããã¯ãã¹ãŠè¯å¥œã§é«éã§åäœããŸããããã®ãããªå现èãªããžã§ã¯ããŸãã¯çŽ°é·ãïŒisoZïŒã«ã©ã ã®å Žåã®ã¿:)ç§ã¯åã座æšã«æ²¿ã£ãŠçŽ°é·ããªããžã§ã¯ãããŸãã¯å¹ ã®ãªãããã§ã³ã¹ãã®ããäžè¬çãªãœãªã¥ãŒã·ã§ã³ã«èå³ããããŸãããã ããåžæããé«ãã§åãæ¹åã«äŒžã³ãŸãã
ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ããµã€ãºã3x0ããã³0x3ã® ããã§ã³ã¹ããæã€3x1ããã³1x3ã®çŽ°é·ããªããžã§ã¯ããæ£ãããœãŒããããŠããŸã
ãããŠãããããåé¡ãå§ãŸããã©ããžè¡ããã決ããå¿ èŠãããå Žæãå§ãŸããŸãã
- ããã«ãã»ã«ã©ãŒããªããžã§ã¯ããããŠãã»ã«ã©ãŒããªããžã§ã¯ãã«åå²ããŸãã åçŽã¹ããªããã«ã«ãããããããã®ã¹ããªããã䞊ã¹æ¿ããŸã
- ããè€éã§èå³æ·±ãå¥ã®ãœãŒããªãã·ã§ã³ãèããŠãã ãã
ç§ã¯2çªç®ã®ãªãã·ã§ã³ãéžæããŸãããç§ã¯è«çã®ç¹å¥ãªã¢ãããŒãã§ããåæïŒèªåïŒã§ãèžè¡ã®ç¹å¥ãªæºåã«é¢äžããããããŸããã§ããã åèãŸã§ã«ãæåã®æ¹æ³ã¯ããç¥ãããŠããFallout 1ããã³Fallout 2ã²ãŒã ã§äœ¿çšãããŠãããã²ãŒã ããŒã¿ãæ¶åãããšãããã®ã¹ããªããã芳å¯ã§ããŸãã
2çªç®ã®ã¢ãããŒãã¯ããªããžã§ã¯ãã®ãœãŒãåºæºãæå³ããŸãããã€ãŸãããªããžã§ã¯ãããœãŒãããããã®ç¹å¥ãªèšç®å€ã¯ãããŸããã 誰ãä¿¡ããªãïŒãããŠã¢ã€ãœã¡ãè¡ããªãã£ãå€ãã®äºº-ä¿¡ããªãïŒã1æã®çŽãåãã 2x8ããããšãã°2x2ã®ãªããžã§ã¯ããæããŸããäŸãšããŠ8x2 ã¬ã³ãºãè¿œå ããäºãã«å¯ŸããŠç°ãªãäœçœ®ã«äžŠã¹æ¿ããŠã¿ãŠãã ããã
ãŸããæ°ã¯ãããŸãããããããã®éã®é¢ä¿ãèšç®ã§ããŸãïŒå€§ãŸãã«èšããšã誰ããéè€ããŸãïŒãããã¯ã ããããžã«ã«ãœãŒãã§äœ¿çšã§ããŸãã ãªããžã§ã¯ãã®äŸåé¢ä¿ã¯ãã¢ã€ãœã¡ããªãã¯è»žäžã®ã¢ã€ãœã¡ããªãã¯åº§æšã®æ圱ã䜿çšããŠèšç®ã§ããŸãã
ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ãéãç«æ¹äœã¯èµ€ã«äŸåããŠããŸã
ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ãç·ã®ç«æ¹äœã¯éã«äŸåããŠããŸã
2ã€ã®è»žãžã®äŸåã決å®ããããã®æ¬äŒŒã³ãŒãïŒZ軞ãåæ§ïŒïŒ
bool IsIsoObjectsDepends(IsoObject obj_a, IsoObject obj_b) { var obj_a_max_size = obj_a.position + obj_a.size; return obj_b.position.x < obj_a_max_size.x && obj_b.position.y < obj_a_max_size.y; }
ãã®ã¢ãããŒãã䜿çšããŠããªããžã§ã¯ãéã®äŸåé¢ä¿ãæ§ç¯ãã衚瀺Z座æšãèšå®ããããšã«ããããã¹ãŠã®ãªããžã§ã¯ããšãã®äŸåé¢ä¿ãååž°çã«èµ°æ»ããŸãã ãã®ã¢ãããŒãã¯éåžžã«æ®éçã§ãããæãéèŠãªããšã¯ãããæ©èœããããšã§ãã ãã®ã¢ã«ãŽãªãºã ã®ãã詳现ãªèª¬æã¯ãããšãã°hereããã³hereã«ãããŸã ã ãŸãããã®ã¢ãããŒãã¯ã ã¢ã€ãœã¡ããªãã¯çšã®äžè¬çãªãã©ãã·ã¥ã©ã€ãã©ãªïŒ as3isolib ïŒã§ã䜿çšãããŠããŸãã
ãã¹ãŠã¯åé¡ãããŸãããããã®ã¢ãããŒãã®ã¢ã«ãŽãªãºã ã®è€éãã¯OïŒN ^ 2ïŒã§ããäŸåé¢ä¿ãæ§ç¯ããã«ã¯ãåãªããžã§ã¯ãããããããšæ¯èŒããå¿ èŠãããããã§ãã ããããæé©åã¯åŸã®ããŒãžã§ã³ã«å»¶æãããŸããããã ããäœãåããªããšãã«äœããœãŒããããªãããã«ãé 延åãœãŒããå®è¡ããŸããã æé©åã«ã€ããŠã¯åŸã§ã
ãšãã£ã¿ãŒæ¡åŒµ
ç®æšã¯æ¬¡ã®ããã«èšå®ãããŸããã
- ãªããžã§ã¯ãã®ãœãŒãã¯ãã²ãŒã å ã ãã§ãªããšãã£ã¿ãŒã§ãæ©èœããã¯ãã§ã
- ä»ã®ã®ãºã¢ç¢å°ïŒãªããžã§ã¯ãã移åããç¢å°ïŒãå¿ èŠã§ã
- 移åæã®ã¿ã€ã«ã®ãªãã·ã§ã³ã®é 眮
- çå°ºæ§ã¯ãŒã«ãã€ã³ã¹ãã¯ã¿ãŒã§ã®ã¿ã€ã«ãµã€ãºã®èªåé©çšãšãã®ã¿ã¹ã¯
- çå°ºæ§ã®å¯žæ³ã§AABBãªããžã§ã¯ããæç»
- ãªããžã§ã¯ãã®ã€ã³ã¹ãã¯ã¿ãŒã§ã®çå°ºæ§åº§æšã®è¡šç€ºãã²ãŒã äžçã§ãªããžã§ã¯ãã®ã©ã®äœçœ®ãå€åããããå€æŽãããšã
ãã¹ãŠã®ç®æšãéæããããããUnityã䜿çšãããšããšãã£ã¿ãŒãå€§å¹ ã«æ¡åŒµã§ããŸãã ãªããžã§ã¯ãã€ã³ã¹ãã¯ã¿ãŒã«æ°ããã¿ãããŠã£ã³ããŠããã¿ã³ãæ°ãããã£ãŒã«ããè¿œå ããŸããå¿ èŠã«å¿ããŠãåžæããã¿ã€ãã®ã³ã³ããŒãã³ãçšã«ç¬èªã®ã«ã¹ã¿ã ã€ã³ã¹ãã¯ã¿ãŒãäœæããããšãã§ããŸãã ãŸãããšãã£ã¿ãŒãŠã£ã³ããŠã«è¿œå æ å ±ïŒç§ã®å Žåã¯AABBãªããžã§ã¯ãïŒã衚瀺ããŠããªããžã§ã¯ãã移åããããã®æšæºã®ç¢å°ã眮ãæããããšãã§ããŸãã ãšãã£ã¿ãŒå ã§ã®ãœãŒãã¯ãããžãã¯ãã©ã°ExecuteInEditModeã«ãã£ãŠæ±ºå®ãããŸãããããã«ããããªããžã§ã¯ãã®ã³ã³ããŒãã³ãããšãã£ã¿ãŒã¢ãŒãã§å®è¡ã§ããããã«ãªããŸããã€ãŸããã²ãŒã ãšåãããšãã§ããŸãã
ãã¡ãããããã¯ãã¹ãŠãåé¡ãããããçš®é¡ã®ããªãã¯ããªãããã§ã¯ãããŸããããæ°æé以äžèŠåŽããããšã¯ãããŸããã§ããïŒGoogleããã©ãŒã©ã ãã³ãã¥ããã£ã¯ãããã¥ã¡ã³ãã«èšèŒãããŠããªãåé¡ã®è§£æ±ºãæ¯æŽããŸããïŒã
ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ãçå°ºæ§ã®äžçã§ãªããžã§ã¯ãã移åããããã®ç§ã®ã®ãºã¢
ãªãªãŒã¹
æåã®ããŒãžã§ã³ãäœæãããã¹ã¯ãªãŒã³ã·ã§ãããæ®ãããã¢ã€ã³ã³ãäœããã®åœ¢ã§æããã説æãè¡ãããŸãã æéã§ãã ã·ã³ããªãã¯äŸ¡æ Œã5ãã«ã«èšå®ãããã©ã°ã€ã³ã«å ¥åããŠãUnityããã®ã¢ããã°ã¬ãŒãã®çµæãåŸ ã¡ãŸãã ç§ã¯é·ãéäŸ¡æ Œã«ã€ããŠèããŠããŸããã§ããããéã皌ããšããç®æšã¯ãããŸããã§ãããéèŠããããã©ããããããããªãã©ããèŠã€ããããšããç®æšããããŸããã ã¢ã€ãœã¡ããªãã¯ã²ãŒã ã®éçºè ãæ¯æŽããããšãç®æšã§ããããããã¯äœããã®çç±ã§æ©äŒãšè¿œå ãå®å šã«å¥ªãããŸããã
èŠãã5æ¥éïŒæåã®ããŒãžã§ã³ãæžãã®ãšã»ãŒåãéãè²»ãããŸããããããŸã調ã¹ããèãããããã«ãèªåããã£ãŠããããšãç¥ã£ãŠããã®ã§ãã¢ã€ãœã¡ã«åãã£ãŠæãå§ããŠãã人ã«æ¯ã¹ãŠé床ãéããªããŸããïŒãã©ã°ã€ã³ãæ¿èªãããŠãããåºã«è¡ã£ãŠæ¥œããããšãã§ããçŸåšã®å£²äžããŒãã§ããããšã確èªã§ããŸãã 圌ã¯å°å ã®ãã©ãŒã©ã ã«æ³šç®ããã¹ãã¢å ã®ããŒãžã«Google Analyticsãåã蟌ã¿ãæµ·ããã®å€©æ°ãåŸ ã¡å§ããŸããã
ç§ã¯é·ãåŸ ã€å¿ èŠããªããæåã®è²©å£²ã¯ãã¡ããããã©ãŒã©ã ãã¹ãã¢ã§ã®ã¬ãã¥ãŒãè¡ã£ãã 1æã®æ®ãã®æéããã©ã°ã€ã³ã®ã³ããŒã12å販売ãããŸãããããããç§ã®èå³ã§ãããšèããŠç¶ç¶ããŸããã
æé©å
äž»ãªäžæºã¯æ¬¡ã®2ã€ã§ããã
- ãœãŒãã®ã¢ã«ãŽãªãºã ã®è€éã-OïŒN ^ 2ïŒ
- ã¬ããŒãžã³ã¬ã¯ã¿ãŒãšå šäœçãªããã©ãŒãã³ã¹ã®åé¡
ã¢ã«ãŽãªãºã
100åã®ãªããžã§ã¯ããšOïŒN ^ 2ïŒã䜿çšããŠãäŸåé¢ä¿ãèŠã€ããããã ãã«1äžåã®ãã§ãã¯ããããŸããããããããã¹ãŠã調ã¹ãŠã衚瀺ZããœãŒãããããã«èšå®ããå¿ èŠããããŸãã äœãã解決ããå¿ èŠããããŸããã æåŸã«ãç§ã¯èšå€§ãªéžæè¢ãè©ŠããŸãããã決æã«èŠããã§ç ããŸããã§ããã ãã¹ãããã¡ã«ããºã ã®ãã¹ãŠã説æããã®ã§ã¯ãªããçŸæç¹ã§åæ¢ããããšããã詳ãã説æããŸãã
æåã«ããã¡ããã衚瀺ãããŠãããã®ã ãããœãŒãããŸãã ããã¯ããã¬ãŒã å ã«èª°ãããã®ãããã¬ãŒã ã«è¡šç€ºãããã®ãã䞊ã¹æ¿ãããªããžã§ã¯ããè¿œå ããã®ããéåºãããšãã«ãããå¿ããã®ããåžžã«ææ¡ããå¿ èŠãããããšãæå³ããŸãã Unityã¯ããªããžã§ã¯ãã®ããŠã³ãã£ã³ã°ããã¯ã¹ãã·ãŒã³ããªãŒå ã®åãšäžç·ã«èªèãããã¹ãŠã®åãå®è¡ããïŒãããŠãè¿œå ãšåé€ãå¯èœãªããæ¯åïŒãªãã·ã§ã³ãéžæããããšã¯ã§ããŸããã OnBecameVisibleã€ãã³ããšãã®ilkãã芪ãªããžã§ã¯ãã«å¯ŸããŠã®ã¿æ©èœãããããäžå¯èœã§ãã ãã ããç®çã®ãªããžã§ã¯ããšãã®åãããã¹ãŠã®ã¬ã³ãã©ãŒã³ã³ããŒãã³ããååŸããæ©äŒããããŸãã ãã®ãªãã·ã§ã³ã¯çŸããã§ã¯èŒããŸãããã蚱容ã§ããããã©ãŒãã³ã¹ãåããåãæ®éçãªæ¹æ³ã¯èŠã€ãããŸããã§ããã
GetComponentsInChildrené¢æ°ã䜿çšããããšãã埮åŠãªç¹ããããŸããããã«ãããã³ã³ããŒãã³ããå«ãæ°ããé åãè¿ããã®ãšã¯ç°ãªããç®çã®ãããã¡ã«å²ãåœãŠãã«ã³ã³ããŒãã³ããååŸã§ããŸããList<Renderer> _tmpRenderers = new List<Renderer>(); bool IsIsoObjectVisible(IsoObject iso_object) { iso_object.GetComponentsInChildren<Renderer>(_tmpRenderers); for ( var i = 0; i < _tmpRenderers.Count; ++i ) { if ( _tmpRenderers[i].isVisible ) { return true; } } return false; }
第äºã«ã OïŒN ^ 2ïŒã§äœããããå¿ èŠããããŸãã 空éãåå²ããããã®å€ãã®ãªãã·ã§ã³ãè©ŠããŸãããã衚瀺ã¹ããŒã¹å ã®åçŽãª2次å ã°ãªããã«èœã¡çããŸãããããã§ã¯ãã¢ã€ãœã¡ããªãã¯ãªããžã§ã¯ããæ圱ããŸããåã»ã¯ã¿ãŒã«ã¯ã亀差ããã¢ã€ãœã¡ããªãã¯ãªããžã§ã¯ãã®ãªã¹ããå«ãŸããŸãã èãæ¹ã¯åçŽã§ãããªããžã§ã¯ãã®æ圱ã亀差ããªãå Žåããªããžã§ã¯ãéã®é¢ä¿ãæ§ç¯ããŠãæå³ããããŸããã 次ã«ã衚瀺ãããŠãããã¹ãŠã®ãªããžã§ã¯ããå®è¡ããå¿ èŠãªã»ã¯ã¿ãŒã§ã®ã¿äŸåé¢ä¿ãæ§ç¯ããŸããããã«ãããã¢ã«ãŽãªãºã ã®è€éãã軜æžããã貎éãªé床ãåäžããŸãã ãã¹ãŠã®ãªããžã§ã¯ãã®ãµã€ãºã®å¹³åãšããŠã»ã¯ã¿ãŒãµã€ãºãéžæããŸãããçµæã¯ç§ã«é©ããŠããŸãã
å šäœçãªããã©ãŒãã³ã¹
ããã§ã¯ããã¡ããå¥ã®èšäºãæžãããšãã§ããŸã...èŠããã«ãã³ã³ããŒãã³ãããã£ãã·ã¥ããŸãïŒ GetComponentã¯ããããæ¢ããŠããŸãããããã¯é«éã§ã¯ãããŸããïŒ ãUpdateã«é¢ãããã¹ãŠã«æ³šæããŠãã ããããã¹ãŠã®ãã¬ãŒã ãå®äºãã泚æããå¿ èŠãããããšãåžžã«ç解ããå¿ èŠããããŸãã nullãšã®ã«ã¹ã¿ã æ¯èŒãªã©ãããããçš®é¡ã®èå³æ·±ãæ©èœãèŠããŠããŸã ã ãªã©ãªã©ãæçµçã«ã¯ãçµã¿èŸŒã¿ã®ãããã¡ã€ã©ãŒã®ãã¹ãŠã«ã€ããŠèª¿ã¹ã決å®ããèšæ¶ãå§ããŸãã
ãŸããã¬ããŒãžã³ã¬ã¯ã¿ãŒã®çã¿ã«ã€ããŠãããããŸãã ããã©ãŒãã³ã¹ãå¿ èŠã§ããïŒ ã¡ã¢ãªãå²ãåœãŠãããšã®ã§ãããã®ã¯ãã¹ãŠå¿ããŠãã ããããã ãã CïŒ ïŒããã³ç¹ã«ããŒã«ã«ã®å€ãMono ïŒã§ã¯ã foreach ïŒïŒïŒããäœæãããã©ã ããŸã§ããã¹ãŠãå®è¡ã§ããŸããäžéšã®LINQ㯠ãæãåçŽãªå Žåã§ãçŠå¿ã§ãã ãã®çµæãçŸããæ§ææ§é ãšä»ã®ç ç³ããã CïŒã¯é¢çœãæ©èœãåããäžçš®ã®Cã«å€ãããŸãã
ãããã¯ã«é¢ããæçšãªãªã³ã¯ãæäŸããŸãã
ããŒã1 ã ããŒã2 ã ããŒã3
çµæ
ãã®ã¢ã«ãŽãªãºã ãæ¹åãããã®ãèŠãããšããªãã®ã§ãçµæã«ç¹ã«æºè¶³ããŸããã æåã®ããŒãžã§ã³ã§ãæåéã50åã®åããªããžã§ã¯ãã®ã¹ã©ã€ãã·ã§ãŒã«å€ãã£ãå Žåããã¬ãŒã å ã®ãªããžã§ã¯ãã¯800åã«ãªããŸãããã¹ãŠãä¿¡ããããªãé床ã§å転ããããã3ã6ããªç§ã§åãœãŒãããŸãã ããã«ãåæååŸããã¬ãŒã ã«ã¯ã»ãšãã©ã¡ã¢ãªãå²ãåœãŠãããŸããã
è¿œå æ©èœ
ã¬ãã¥ãŒãšææ¡ãèªãã åŸãæè¿ã®ãªãªãŒã¹ã§è¿œå ããããã€ãã®æ©èœãæçããŸããã
2Dãš3Dãæ··åšããã
çå°ºæ§ã²ãŒã ã§2dãš3dãæ··åããããšã¯ãåããšå転ã®ããŸããŸãªãªãã·ã§ã³ïŒããšãã°ãã¢ãã¡ãŒã·ã§ã³ä»ãã®ãã£ã©ã¯ã¿ãŒã®3Dã¢ãã«ïŒã®ã¬ã³ããªã³ã°ãæå°éã«æããèå³æ·±ãæ©èœã§ãã é£ãããããŸãããããã¹ãŠãåé¡ã·ã¹ãã ã«çµã¿èŸŒãå¿ èŠããããŸãã ãã¹ãŠã®åãå«ãããŠã³ãã£ã³ã°ããã¯ã¹ã¢ãã«ãå¿ èŠã§ãã¢ãã«ããã£ã¹ãã¬ã€Zã«æ²¿ã£ãŠãã®å¹ ãŸã§ç§»åããŸãã
ãã®ããããã¹ãŠã®åã§ããŠã³ãã£ã³ã°ããã¯ã¹ã¢ãã«ãèšç®ã§ããŸãBounds IsoObject3DBounds(IsoObject iso_object) { var bounds = new Bounds(); iso_object.GetComponentsInChildren<Renderer>(_tmpRenderers); if ( _tmpRenderers.Count > 0 ) { bounds = _tmpRenderers[0].bounds; for ( var i = 1; i < _tmpRenderers.Count; ++i ) { bounds.Encapsulate(_tmpRenderers[i].bounds); } } return bounds; }
ãããŠãããã¯ãã¹ãŠæçµçã«å€æããŸã
ã«ã¹ã¿ã çå°ºæ§èšå®
ããã§ã¯ãã¹ãŠãæ¯èŒçåçŽã§ãããã¢ã€ãœã¡ã®è§åºŠãã¢ã¹ãã¯ããã¿ã€ã«ã®é«ããèšå®ã§ããããã«ããããšãæ±ããŸããã æ°åŠã§å°ãåŠãã åŸãããªãã¯ãããåŸãããšãã§ããŸãïŒ
ç©çåŠ
ãããŠãããã§ãã£ãšé¢çœãã§ãã ã¢ã€ãœã¡ã¯3Dã®äžçãã·ãã¥ã¬ãŒããããããç©çåŠã¯é«ããªã©ã®3次å ã§ããå¿ èŠããããŸãã é¢çœãããªãã¯ãæãã€ããã Rigidbody ã Colliderãªã©ãçå°ºæ§ã®äžçã®ç©çåŠã®ãã¹ãŠã®ã³ã³ããŒãã³ããè€è£œããŸãã ãããã®èª¬æãšèšå®ã«åºã¥ããŠããšã³ãžã³èªäœãšããã«çµã¿èŸŒãŸããPhysXã䜿çšããŠãç®ã«èŠããªãç©ççãª3次å ã®äžçãç¹°ãè¿ããŸãã 次ã«ãèšç®ãããã·ãã¥ã¬ãŒã·ã§ã³ããŒã¿ãååŸããã¢ã€ãœã¡ããªãã¯ã¯ãŒã«ãã®è€è£œã³ã³ããŒãã³ãã«è¿ããŸãã åæ§ã«ãè¡çªã€ãã³ããšããªã¬ãŒãã·ãã¥ã¬ãŒãããŸãã
ããŒã«ã»ããã®ç©ççãªãã¢
ãã«ãããªã³ã°ãšçµæ
ãã©ãŒã©ã ã§ãã¹ãŠã®ãªãã¡ãŒãå®è£ ããåŸãäŸ¡æ Œã40ãã«ã«åŒãäžãã5è¡ã®ã³ãŒããåããå®äŸ¡ãªãã©ã°ã€ã³ã®ããã«ã¯èŠããªãããšã«ããŸããã Habrã«åããŠæçŽãæžããŠããã®ã§ã質åãææ¡ãèšäºãžã®æ¹å€ã«ãšãŠãããããæããŸãã ãããŠä»ã軜é£ã®ããã«ãåéãããæ¯æã®è²©å£²çµ±èšïŒ
æ | 5 $ | 40ãã« |
---|---|---|
1æ | 12 | 0 |
2æ | 22 | 0 |
è¡é² | 17 | 0 |
4æ | 9 | 0 |
5æ | 9 | 0 |
6æ | 9 | 0 |
7æ | 7 | 4 |
8æ | 0 | 4 |
9æ | 0 | 5 |
Unity Asset Storeã®ã¢ã»ããããŒãžãžã®ãªã³ã¯ïŒ Isometric 2.D Toolset