Java Smooth 2D Rectangle collision?
问题 Hey guys i'm making a maze game and I'm trying to figure out how to make a 2D collision smooth. Currently I have some really bad collision code that I thought up since I haven't done this part yet and it is glitchy and sometimes goes inside the wall then you can't get out. My code: public void checkCollision() { Rectangle player_rectangle = new Rectangle(player.getX(),player.getY(),32,32); for(Wall wall : walls) { Rectangle wall_rectangle = new Rectangle(wall.getX(), wall.getY(), 32,32); if