The native constraint library is the toolset provided by Facepunch to create these relationships via Lua.
This inherent instability is not a flaw so much as a feature of the environment. It teaches the player humility and robust design. Veteran GMod engineers learn to “bake” critical joints by converting them to welds, using glue only for intended break points. They learn to limit the number of glued connections on a single object to reduce solver load. They learn the art of the “support strut”—a non-glued prop that simply rests against another to share the load. In essence, mastering the Glue Library means mastering the eccentricities of the Source physics solver, turning a potential bug into a nuanced design constraint. The player who can build a stable, multi-ton walking mech entirely with glue joints has achieved a kind of virtuosity, having internalized the chaotic logic of the game’s universe.
Enter the .
In the sprawling digital sandbox of Garry’s Mod (GMod), where the only explicit goal is the absence of goals, the difference between chaotic clutter and engineered marvel often comes down to a single, unassuming function: the glue library. While the Source Engine provides the foundational physics of mass, velocity, and collision, and the Wiremod addon introduces the logic of gates and chips, the native Glue Library occupies a unique, almost alchemical space between these two regimes. It is a tool of applied adhesion, a system designed not just to stick objects together, but to create conditional, breakable, and dynamically responsive structures. To understand the Glue Library is to understand a core philosophy of GMod: that the most compelling forms of play emerge not from rigid construction, but from the precarious, the temporary, and the interactive. This essay will argue that the Glue Library is a fundamental, though often overlooked, pillar of GMod’s creative ecology, transforming the game from a mere physics playground into a low-fidelity engineering simulation where players learn systems thinking, iterative design, and the narrative value of structural failure.
However, the Glue Library is not without its frustrations, and these limitations are as instructive as its successes. GMod’s physics engine, while revolutionary for its time, is notorious for its “Krakens”—the violent, spontaneous explosions that occur when the engine’s constraint solver fails to resolve conflicting forces. Glue, being a dynamic constraint, is a frequent Kraken-bait. A complex construction with dozens of overlapping glue joints, especially those under constant torque from a hoverball or thruster, can suddenly and inexplicably tear itself apart. gmod glue library
constraint.Weld( Entity1, Entity2, Bone1, Bone2, forcelimit, nocollide, deleteonbreak )
A constraint is a rule applied to two physics objects (rigid bodies) that restricts their movement relative to one another. The native constraint library is the toolset provided
While early speculation suggested the creator's account had been hacked, later analysis and the nature of the code comments suggested it was a deliberate act
Glue = constraintGlue(Ent1, Ent2, 0, 0, 0, 0, 0) Veteran GMod engineers learn to “bake” critical joints