I'm making a tank shooting game, and I want the bullets to bounce off the walls like they do in Breakout
I currently have
However, this only works for the top and bottom of the walls, not the right and left. Does anyone know how to fix that?
public void bounce() { Actor wall = getOneIntersectingObject(Wall.class); if (wall != null) { setRotation(getRotation() * -1); } }