From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
A debug dialogue box in Gearheads controlling an object's hitbox
The hitbox of a Gearheads toy, controlled by the above screen

A hitbox is an invisible shape commonly used in video games for real-time collision detection. It is often a rectangle (in 2D games) or cuboid (in 3D) that is attached to and follows a point on a visible object (such as a model or a sprite), though circular or spheroidial shapes are also common. It is common for animated objects to have hitboxes attached to each moving part to ensure accuracy during motion.[1][unreliable source?]

Hitboxes are used to detect "one-way" collisions such as a character being hit by a punch or a bullet. They are unsuitable for the detection of collisions with feedback (e.g. bumping into a wall) due the difficulty experienced by both humans and AI in managing a hitbox's ever-changing locations; these sorts of collisions are typically handled with much simpler axis-aligned bounding boxes instead. Players may use the term "hitbox" to refer to these types of interactions regardless.

There are a total of three different kinds of hitboxes that are normally used which includes hitboxes, hurtboxes, and collision boxes. Each of these boxes is used in different ways while creating video games. A Hitbox is an area in which a character or object is able to be hit. These kinds of boxes tend to be a blue or green color. A Hurtbox is a term for the area in which an attack or object can damage said hitbox. These boxes are normally mentioned in fighting games as just "hitbox" . This kind of boxes is normally coded with the color red. A Collision box is the area in which an object can collide with another object that also has a collision box or a solid wall.


  1. ^ "Hitbox". Valve Developer Community. Valve Corporation. Retrieved 18 September 2011.