/// <summary> /// Detect a collision with a rectangle body /// </summary> /// <param name="rectangleBody"></param> /// <returns></returns> protected override bool DetectCollision(RectangleBody rectangleBody) { return (rectangleBody.GetClosestPointOnPerimeter(this.Position) - this.Position).LengthSquared() < this.Radius * this.Radius; }