possiblyContainsPoint method

bool possiblyContainsPoint(
  1. Vector2 point
)

Since this is a cheaper calculation than checking towards all shapes this check can be done first to see if it even is possible that the shapes can contain the point, since the shapes have to be within the size of the component.

Implementation

bool possiblyContainsPoint(Vector2 point) {
  return absoluteCenter.distanceToSquared(point) <= scaledSize.length2;
}