collision java

Solutions on MaxInterview for collision java by the best coders in the world

showing results for - "collision java"
Ben
03 Nov 2020
1// AABB collision
2
3if(player1.x < player2.x + player2.width &&
4    player1.x + player1.width > player2.x &&
5    player1.y < player2.y + player2.height &&
6    player1.y + player1.height > player2.y)
7{
8  // detected
9}