[LUA] Tilemap collision - Druckversion +- KINGx - Das inoffizielle PlayStation Forum & News Portal (http://www.kingx.de/forum) +-- Forum: PS Vita / PSP (/forumdisplay.php?fid=1) +--- Forum: Homebrew (/forumdisplay.php?fid=8) +---- Forum: Development (/forumdisplay.php?fid=34) +---- Thema: [LUA] Tilemap collision (/showthread.php?tid=70292) |
[LUA] Tilemap collision - luaprogrammer - 02.12.2012 18:48 Hallöö ;D Diesmal geht es um eine Tilemap, bei der collision erkannt werden soll. so sieht mein Code bisher aus: Code: for c=1,16 do
Code: oldx = charx
RE: [LUA] Tilemap collision - luaprogrammer - 02.12.2012 21:00 und hat sich nach ein bisschen überlegung erledigt, für diejenigen die is interriesiert: if (charx+24 > d*16-16) and (charx+24 < d*16) and (chary+22 > c*16+16) and (chary+22 <c*16) then genauer bei (chary+22 > c*16+16) muss kein plus sondern ein minus hin >< so klein aber fein. |