CollideAgainst
Introduction
Common Usage
CollideAgainst and Z values
Circle firstCircle = new Circle();
firstCircle.Radius = 16;
Circle secondCircle = new Circle();
secondCircle.Radius = 16;
// The two circles overlap at this point.
// Even if one of the circles has a different Z value...
firstCircle.Z = -1000;
// ... collision will still occur
if(firstCircle.CollideAgainst(secondCircle))
{
// The if-statement will evaluate to true
}Last updated
Was this helpful?