Skip to content

overlaps

overlaps(a, b, inset?): boolean

Whether two sprites’ boxes overlap (sized by Sprite, placed by Position and Anchor). inset shrinks both boxes by that many pixels per side, for forgiving hits. Ignores rotation; Circle sprites count as their box.

number

number

number

boolean