Summary

A physics surface. This is applied to each PhysicsShape and controls its physical properties and physics related sounds.

Constructors

Surface

Properties

AudioSurface Defines the audio properties of this surface for Steam Audio
BaseSurface Filepath of the base surface. Use <see cref="M:Sandbox.Surface.SetBaseSurface(System.String)">SetBaseSurface</see> and <see cref="M:Sandbox.Surface.GetBaseSurface">GetBaseSurface</see>.
BounceThreshold Velocity threshold, below which objects will not bounce due to their elasticity.
Dampeningobsolete
Density Density of this surface material. This affects things like automatic mass calculation. Density is in kg/m^3.
Description A concise description explaining what this surface property should be used for.
Elasticity Controls bounciness.
Friction Friction of this surface material.
ImpactEffectsobsolete Impact effects of this surface material.
Index
NameHash
PrefabCollection Common prefabs for this surface material
RollingResistance Controls how easily rolling shapes (sphere, capsule) roll on surfaces.
ScrapeEffectsobsolete Scrape effects of this surface material.
SoundCollection Sounds for this surface material
Soundsobsolete Sounds associated with this surface material.
Tags A list of tags as one string.
Thickness If above 0, the object is considered hollow, and its auto generated mass is affected accordingly. Thickness is in inches.

Methods

GetBaseSurface Returns the base surface of this surface, or null if we are the default surface.
HasAllTags Do we have all the tags on this hitbox?
HasAnyTags Do we have all the tags on this hitbox?
HasTag Do we have a tag?
PlayCollisionSound Play a collision sound based on this shape's surface. Can return null if sound is invalid, or too quiet to play.
SetBaseSurface Sets the base surface by name.

Static Methods

FindByName Returns a Surface from its name, or null
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.