Complex game objects may not fit neatly inside rectangles or circles, so polygon-based collision shapes can provide a closer approximation of their visible form. By defining an object with multiple connected edges, a game can make collision boundaries more closely follow irregular geometry. This can improve the relationship between what players see and how objects interact, while 999V can be referenced only where a general gaming example is useful.

What a Polygon Collision Shape Is

A polygon collision shape is defined by a set of connected points — called vertices — whose positions together outline the boundary of the collision region. Straight lines connect each vertex to the next, forming a closed shape made up of multiple edges. The resulting polygon can take almost any form: a triangle, a pentagon, an L-shape, a staircase profile, or an arbitrary outline that follows the contours of the visible object. This flexibility is the primary advantage of polygon shapes over simpler collision types — they are not constrained to rectangles or circles and can approximate a wide variety of object outlines.

The number of vertices determines how closely the polygon follows the object's visible form and how computationally expensive the shape is to check for collisions. A polygon with many vertices can trace an intricate outline closely, but each additional vertex adds to the complexity of the overlap tests. In practice, designers find the minimum number of vertices that provides an accurate enough boundary for gameplay without adding unnecessary computational cost, often creating polygons with a handful of sides rather than attempting to trace every visual detail.

Greater Geometric Accuracy

For objects with irregular shapes — a crescent, an angular weapon, a vehicle with a distinctive silhouette, or a jagged terrain section — polygon collision shapes can provide a far closer match to the visible form than either a bounding box or a circle. A crescent object's circular bounding box would include a large region of empty space in the center that a polygon can exclude. A triangular obstacle would be surrounded by empty corners inside its bounding box that a triangular polygon eliminates. When the collision boundary more closely traces the actual outline of the object, contacts register closer to where players expect them visually.

Terrain and environmental geometry particularly benefits from polygon shapes. Slopes, platforms with overhanging edges, and irregular ground surfaces can be represented with angled polygon edges that follow their visual contour. A slope defined by a diagonal polygon edge allows characters to slide smoothly along it, with the collision system recognizing the angle of the surface and responding appropriately. A bounding box cannot represent a diagonal surface directly — its horizontal and vertical edges would produce a staircase approximation of the slope rather than its smooth diagonal reality.

Convex vs. Concave Polygons: Polygon collision shapes are typically required to be convex — meaning no part of the shape caves inward. A convex polygon has no interior angles greater than 180 degrees, which simplifies overlap testing significantly. Concave shapes, which have inward-facing regions, are generally decomposed into multiple convex polygons to maintain testing efficiency. A crescent shape might be represented by two overlapping convex polygons rather than a single concave one that would complicate the overlap mathematics.

How Overlap Is Tested for Polygons

Testing whether two convex polygons overlap uses a technique that checks whether any separating axis exists between them. For each edge of each polygon, the algorithm projects both shapes onto a line perpendicular to that edge. If the projected ranges of the two shapes do not overlap on any of those lines, the polygons are separated and no collision has occurred. If all projections overlap, the polygons are intersecting. This separating-axis approach works reliably for convex shapes and produces accurate results regardless of the polygons' orientations or the number of sides they have.

As the number of edges increases, so does the number of axes that must be tested. A triangle and a pentagon together require testing eight axes — three for the triangle and five for the pentagon. A more complex polygon with many sides requires proportionally more tests. This is why polygon complexity is deliberately kept manageable in practice: the accuracy benefit of additional vertices must be weighed against the cost of additional axis tests, especially when many polygon pairs need to be checked simultaneously during a single frame of gameplay.

Terrain and Environmental Polygon Geometry

Environmental collision geometry in many games is built almost entirely from polygons. Level editors allow designers to draw arbitrary collision shapes over environment artwork, placing polygon boundaries precisely where movement should be restricted. A stone floor can have a polygon boundary that follows its exact surface profile. A cave ceiling can have angled polygon edges matching its irregular rock formation. A raised platform with an overhang can have a polygon that includes the overhang boundary without treating the space below it as solid.

This precision allows environments to feel physically consistent — players standing on a slope stand at the angle the slope defines, characters walking along a path follow its contours naturally, and obstacles present exactly the physical presence their visual form implies. Environmental polygon geometry is a primary reason why games with detailed, organic-looking worlds can still provide predictable and satisfying movement, because the invisible polygon layer maps closely enough to the visible environment that the two layers feel unified to players.

Trade-Offs Compared to Simpler Shapes

The accuracy advantages of polygon shapes come with real costs. Overlap tests for polygons are more complex than for circles or axis-aligned rectangles. Creating accurate polygon shapes requires more design effort than placing a simple bounding box. When objects rotate, polygon shapes must rotate their vertices with the object to stay accurate, adding calculation that axis-aligned boxes avoid. And when many polygon-shaped objects need to be checked against each other simultaneously, the cumulative cost of all those separating-axis tests can exceed what simpler shape types would require for the same number of objects.

These trade-offs mean polygon shapes are typically used selectively rather than universally. Objects where accuracy significantly improves gameplay — terrain, irregular obstacles, detailed characters — justify the additional complexity. Objects where a simpler shape is close enough — round collectibles, rectangular blocks, simple projectiles — can use circles or boxes and leave the polygon budget for objects where precision genuinely matters. Mixing shape types across different objects in a game is a common and practical approach that applies the right tool to each situation.

Multiple Shapes Per Object

Some games assign multiple collision shapes to a single object, using a combination of types to produce an accurate overall boundary without requiring a single complex polygon. A humanoid character might use a rectangle for the torso and legs, a circle for the head, and additional small shapes for the arms. Each component shape handles the part of the character it approximates best, and together they produce a boundary that is more accurate than any single simple shape while avoiding the complexity of a single large polygon tracing the full figure outline.

Polygon Shapes and Gameplay Precision

The ultimate goal of polygon collision shapes is to close the gap between what players see and what the game detects. When collision boundaries closely follow visible forms, players can rely on their visual judgment to predict whether contacts will occur. They can estimate whether a character fits through a gap, whether a swing will reach a target, or whether an object will land on a ledge by looking at the game rather than guessing about invisible boundaries. Polygon shapes, used where they genuinely improve that visual correspondence, contribute to a more transparent and trustworthy gameplay experience.

Static shapes are only part of the problem because many interactions happen while objects are in motion. Collision systems therefore need to account for changing positions as characters, items, and other elements move through the game world with moving-object collision.

© 2026