Documentation > Utils > Collisions
Version: 1.2
CollidePointRect(XA, YA, XB, YB, Width, Height)
This function checks if the given point is inside the given rectangle.
XA
X-axis coordinate of the point
YA
Y-axis coordinate of the point
XB
X-axis coordinate of the rectangle
YB
Y-axis coordinate of the rectangle
Width
Width of the rectangle
Height
Height of the rectangle
Return
Return true if the point is inside the rectangle.
CollideRectRect(XA, YA, WidthA, HeightA, XB, YB, WidthB, HeightB)
This function checks if 2 rectangles collide.
XA
X-axis coordinate of the first rectangle
YA
Y-axis coordinate of the first rectangle
WidthA
Width of the first rectangle
HeightA
Height of the first rectangle
XB
X-axis coordinate of the second rectangle
YB
Y-axis coordinate of the second rectangle
Width
Width of the second rectangle
Height
Height of the second rectangle
Return
Returns true if the two rectangles touch or overlap; otherwise returns false.
CollidePointCircle(XA, YA, XB, YB, RB)
This function allows to check if a given point is inside a given circle.
XA
X-axis coordinate of the point
YA
Y-axis coordinate of the point
XB
X-axis coordinate of the center of the circle
YB
Y-axis coordinate of the center of the circle
RB
Radius of the circle
Return
Return true if the point is inside the circle.
CollideCircleCircle(XA, YA, RA, XB, YB, RB)
This function allows to check if 2 circles touch each other.
XA
X-axis coordinate of the center of the first circle
YA
Y-axis coordinate of the center of the first circle
RA
Radius of the first circle
XB
X-axis coordinate of the center of the second circle
YB
Y-axis coordinate of the center of the second circle
RB
Radius of the second circle
Me contacter