Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: Add component object to gameobject unity 
Csharp :: change border color of textfield in flutter 
Csharp :: c# gzip byte array 
Csharp :: unity check if space pressed 
Csharp :: how to edit text mesh pro text 
Csharp :: quit button unity 
Csharp :: how to lerp in c# 
Csharp :: get date of tomorrow c# 
Csharp :: c# alphabet array 
Csharp :: c# open folder in explorer 
Csharp :: c# copy file to directory 
Csharp :: how to get the current gameobject animator in unity 
Csharp :: how to disable and enable rigidbody unity 
Csharp :: how to set the fps in monogame 
Csharp :: unity access child 
Csharp :: get scene name unity 
Csharp :: how to move a object in unity c# 
Csharp :: unity movetowards 
Csharp :: decode base64 string c# 
Csharp :: unity 2d detect click on sprite 
Csharp :: random from list c# 
Csharp :: system command in c# 
Csharp :: c# tostring mmm dd yyyy 
Csharp :: get remainder of number c# 
Csharp :: c# unity camera follow player horizontal axis 
Csharp :: c# repeat string x times 
Csharp :: c# stop 
Csharp :: change scene unity 
Csharp :: axwmp balance c# 
Csharp :: if exist TempData[] c# 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =