Gmod Glue Library – Plus & Recommended
constraint.Weld( Entity1, Entity2, Bone1, Bone2, forcelimit, nocollide, deleteonbreak )
To understand the glue, you must understand the materials. The constraint library is the bread and butter of GMod construction. However, many developers use it inefficiently.
Wiremod is the standard for advanced building. Once installed: gmod glue library
This article explores the architecture of "gluing" in GMod, how to utilize the native constraint library effectively, and why building your own "Glue Library" abstraction is often necessary for high-performance addon creation.
Upon performing any input (like jumping or firing a weapon), the game would display a full-screen, high-resolution image of "Goatse" (a notorious shock image). constraint
In typical GMod, hooking a rope to a wall just creates a pivot. If you want your character to "pull" themselves up, you need to dynamically glue the player's prop to the wall, then unglue it. The Glue Library provides the onBreak() callback in Lua, so your climbing system knows when to switch from "attached" to "falling."
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. Wiremod is the standard for advanced building
Standard welds don't look like magnets. Using constraint.Glue paired with a Wire "Holographic Ray" allows you to create a magnet that:
The native constraint library is the toolset provided by Facepunch to create these relationships via Lua.
The Glue Library’s most profound contribution is perhaps its narrative function. In a game without pre-written stories, players become the authors of emergent drama. The weld tool creates static sets; the glue tool creates dynamic plot points. A classic GMod machinima trope—the rickety pirate ship that disintegrates upon firing its cannons—relies entirely on the Glue Library. The glue holds the planks together just enough to float, but the recoil from a thrustered cannon is a force that exceeds the glue’s threshold. The result is not a simple explosion, but a cinematic, cascading deconstruction: the mast snaps, the hull splits, and individual planks spiral into the water. The failure is not a glitch or a bug; it is the climax of a self-authored disaster movie.