Answers for "java collision tutorial"

1

collision java

// AABB collision

if(player1.x < player2.x + player2.width &&
    player1.x + player1.width > player2.x &&
    player1.y < player2.y + player2.height &&
    player1.y + player1.height > player2.y)
{
  // detected
}
Posted by: Guest on June-12-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language