android - Libgdx/Java 2D Duengon collision and collision from all sides -


im developing small game, duengon rpg crawler.it works fine , today tried implement collision mechanic, because shouldnt go trough walls... map completly randomly generated. havent found tutorials how setup collision mechanic libgdx or java, :

rectangle rect = new rectangle(); rect.overlaps(r2); 

that worked yes, didnt showed me, rectangle colides other one. wanna have, tutorial java or libgdx, how make 4 sides collision, step step :) or example...

thanks attention , help.


Comments