Garry's Mod Wiki

SurfacePropertyData

Description

Table returned by util.GetSurfaceData.

Members

string name
The name of the surface property, identical to util.GetSurfacePropName.
number hardnessFactor
How hard a surface is. If this is greater than or equal to another surfaces's hardThreshold, a hard impact sound will be used.
number hardThreshold
Hardness threshold for impact sounds. HitSurface.hardnessFactor >= InflictorSurface.hardThreshold - hard impact sound (depends on hardVelocityThreshold's value), HitSurface.hardnessFactor < InflictorSurface.hardThreshold - soft impact sound (always).
number hardVelocityThreshold
Velocity threshold for impact sounds. impactSpeed >= HitSurface.hardVelocityThreshold - hard impact sound (depends on hardThreshold's value), impactSpeed < HitSurface.hardVelocityThreshold - soft impact sound (always).
number reflectivity
Amount of sound reflected from the surface represented as a number 0.0 - 1.0. 0 - no reflection, 1 - fully reflected.
number roughnessFactor
How rough a surface is. If this is greater than or equal to another surfaces's roughThreshold, a rough scrape sound will be used.
number roughThreshold
Roughness threshold for friction sounds. HitSurface.roughnessFactor >= InflictorSurface.roughThreshold - rough friction sound, HitSurface.roughnessFactor < InflictorSurface.roughThreshold - soft friction sound.
number climbable
Indicates whether or not the surface is a ladder. Used to detect whether a player is on a ladder. 0 - false, > 0 - true.
number jumpFactor
Scalar multiplier for player jump height - or more accurately, applied z-axis velocity on a surface. For example, 1 - normal jump, 2 - twice as high, and 0.5 - half as high.
number material
The surface material. See MAT enum.
number maxSpeedFactor
Scalar multiplier for player speed. Achieves this by multiplying CMoveData:SetMaxSpeed in GM:Move.
number dampening
This is the physical drag on an object when in contact with this surface (0 - x, 0 none to x a lot).
number density
Material density in kg / m^3 (water is 1000). If a surface's density is < 1000, it will float in water. This is used to calculate the total mass of an object.
number elasticity
Collision elasticity - used to compute coefficient of restitution represented as a number 0.0 - 1.0. 0.01 is soft, 1.0 is hard.
number friction
Physical friction used to slow entities touching the surface represented as a number 0.0 - 1.0. 0.01 is slick, 1.0 is completely rough.
number thickness
Material thickness. If this is 0, the material is not volumetrically solid, and thus the object mass will be calculated as "volume * 0.0254^3 * density" where 0.0254 is meters per inch. If non-zero, the mass will be "surfacearea * thickness * 0.0254^3 * density".
string breakSound
Sound to play when a prop or func_breakable is broken.
string bulletImpactSound
Bullet impact sound with this surface.
string impactHardSound
Physical impact sound when hitting surfaces hard.
string impactSoftSound
Physical impact sound when hitting surfaces softly.
string rollingSound
Unused sound.
string scrapeRoughSound
Friction sound when roughly scraping against an entity.
string scrapeSmoothSound
Friction sound when smoothly scraping against an entity.
string stepLeftSound
Footstep sound for left foot.
string stepRightSound
Footstep sound for right foot.
string strainSound
Unused sound.