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.
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: 21ms

Session 0
DB GetPage 3
Generate Html 2
SaveChanges 8
Render Body 0
Render Sidebar 6