class Surface : GameResource

book_4_sparkGenerated
code_blocksInput

Description

The Surface class in the Sandbox namespace represents a physics surface. It is applied to each PhysicsShape and controls its physical properties and physics-related sounds.

Members

Static Members

Member NameSummary
FindByNameFinds a surface by its name.

Instance Members

Member NameSummary
GetBaseSurfaceReturns the base surface of this surface, or null if we are the default surface.
SetBaseSurfaceSets the base surface using a name.
GetRandomGibReturns a random gib taking into account base surface.
HasTagChecks if the surface has a specific tag.
HasAllTagsChecks if the surface has all specified tags.
HasAnyTagsChecks if the surface has any of the specified tags.
NameHashHash of the surface name.
IndexIndex of the surface.
BaseSurfaceFilepath of the base surface. Use SetBaseSurface and GetBaseSurface.
AudioSurfaceDefines the audio properties of this surface for Steam Audio.
DescriptionA concise description explaining what this surface property should be used for.
FrictionFriction of this surface material.
ElasticityControls bounciness.
DensityDensity of this surface material. This affects things like automatic mass calculation. Density is in kg/m^3.
ThicknessIf above 0, the object is considered hollow, and its auto generated mass is affected accordingly. Thickness is in inches.
DampeningCurrently unused and does nothing. TODO: Implement or remove.
RollingResistanceControls how easily rolling shapes (sphere, capsule) roll on surfaces.
BounceThresholdVelocity threshold, below which objects will not bounce due to their elasticity.
ImpactEffectsImpact effects of this surface material.
ScrapeEffectsScrape effects of this surface material.
SoundsSounds associated with this surface material.
BreakablesBreakable info for this surface material.
TagsA list of tags as one string.