Hitbox/Hurtbox AABB Overlap Check

2D/3D axis-aligned hitbox/hurtbox overlap and contact flags; no game collision response, swept motion or invulnerability logic.

Description

Hitbox/Hurtbox AABB Overlap Check: return positive volume overlap, closed set contact.

Axis-aligned boxes can touch at a boundary without sharing positive volume. A collision check should distinguish those two relationships.

This tool returns positive volume overlap, closed set contact. Use the stated units and model convention when interpreting these fields.

When to use this tool

Use this tool when the supplied inputs match the specific operation described above and you need a repeatable result under its stated convention.

  • Check the supported input and output contract against an existing calculation or observation.
  • Use the complete example to confirm units, selector spelling and result interpretation.

How to use the tool and how it works

  1. Enter every field in the input table using the stated units and the exact supported selector spelling where applicable.
  2. Run the tool. Correct input errors before interpreting an output.
  3. Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.

Require matched 2D or 3D minimum/maximum vectors. Compare every axis using strict inequalities for positiveVolumeOverlap and inclusive inequalities for closedSetContact.1

Input fieldMeaning and unitsAccepted input
hitboxMinHitbox min.List of finite numbers
hitboxMaxHitbox max.List of finite numbers
hurtboxMinHurtbox min.List of finite numbers
hurtboxMaxHurtbox max.List of finite numbers
Output fieldInterpretation
resultObject containing the following named result fields.
result.positiveVolumeOverlapTrue only when the boxes overlap with positive extent on every axis.
result.closedSetContactTrue for shared boundaries as well as positive-volume overlap.
json
{
  "input": {
    "hitboxMin": [
      0,
      0,
      0
    ],
    "hitboxMax": [
      2,
      2,
      2
    ],
    "hurtboxMin": [
      1,
      1,
      1
    ],
    "hurtboxMax": [
      3,
      3,
      3
    ]
  },
  "output": {
    "result": {
      "positiveVolumeOverlap": true,
      "closedSetContact": true
    }
  }
}

Limitations and assumptions

  • Rotated shapes, motion between frames and game-specific hit priorities are outside this geometric check.
  • Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
  • Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.

Alternative or Complementary methods

Check the underlying observations, units and conventions independently before using the result in a larger workflow. The tools listed below address nearby tasks; compare their inputs and scope before substituting one for this operation.

References

  1. Tool behavior and example: Hitbox/Hurtbox AABB Overlap Check — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies