Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • HitBox2DService

Index

Methods

Static detailedOverlapInformation

  • Gets detailed information about how two entities overlap, and computes the precise intersection area as a convex polygon with up to eight vertices.

    Warning: in cases where two hit areas are just barely touching, the system may report an overlap with an area of zero (zero vertices).

    Parameters

    Returns DetailedHitBoxOverlap

Static hitTest

  • Performs a hit test on all entities that have RectHitBox2D or Sprite2DRendererHitBox2D components. Returns the closest hit in z order at point, and outputs the UV Coordinates at the hit location. Returns an empty entity if there is no hit. Input point is in world space, but the z coordinate is ignored.

    Parameters

    Returns HitTestResult

Static hitTestCamera

  • Gets the topmost camera at point, in world coordinates (ignores the z coordinate). This is useful to pass into hitTest if the camera is not known.

    Parameters

    Returns Entity

Static rayCast

  • Performs a 2D hit test along a ray and returns the first hit. Ignores the z coordinate.

    Parameters

    Returns RayCastResult

Generated using TypeDoc