Garry's Mod Wiki


The physenv library allows you to control the physics environment created by the engine, and lets you modify constants such as gravity and maximum velocity.


physenv.AddSurfaceData( string properties )
Adds surface properties to the game's physics environment. The game has a limit of 128 surface properties - this includes properties loaded automatically from surfaceproperties.txt. Due to this, there's only a small amount of open slots that can be registered with GMod's provided surfaceproperties.txt.Issue Tracker: 2604
number physenv.GetAirDensity()
Returns the air density.
Vector physenv.GetGravity()
Gets the global gravity.
table physenv.GetPerformanceSettings()
Gets the current performance settings in table form.
physenv.SetAirDensity( number airDensity )
Sets the air density.
physenv.SetGravity( Vector gravity )
Sets the directional gravity, does not work on players.
physenv.SetPerformanceSettings( table performanceSettings )
Sets the performance settings.

Page Links

Special Pages



Render Time: 27ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 11