# Sandbox.Surface

A physics surface. This is applied to each [PhysicsShape](/api/Sandbox.PhysicsShape) and controls its physical properties and physics related sounds.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.GameResource](/api/Sandbox.GameResource)

## Constructors

- [`Surface`](/api/Sandbox.Surface/.ctor)

## Properties

- [`AudioSurface`](/api/Sandbox.Surface/AudioSurface): Defines the audio properties of this surface for Steam Audio
- [`BaseSurface`](/api/Sandbox.Surface/BaseSurface): Filepath of the base surface. Use [SetBaseSurface](/api/Sandbox.Surface/SetBaseSurface) and [GetBaseSurface](/api/Sandbox.Surface/GetBaseSurface).
- [`BounceThreshold`](/api/Sandbox.Surface/BounceThreshold): Velocity threshold, below which objects will not bounce due to their elasticity.
- [`Dampening`](/api/Sandbox.Surface/Dampening)
- [`Density`](/api/Sandbox.Surface/Density): Density of this surface material. This affects things like automatic mass calculation. Density is in kg/m^3.
- [`Description`](/api/Sandbox.Surface/Description): A concise description explaining what this surface property should be used for.
- [`Elasticity`](/api/Sandbox.Surface/Elasticity): Controls bounciness.
- [`FluidAngularDrag`](/api/Sandbox.Surface/FluidAngularDrag): Angular drag applied when submerged.
- [`FluidLinearDrag`](/api/Sandbox.Surface/FluidLinearDrag): Linear drag applied when submerged.
- [`Friction`](/api/Sandbox.Surface/Friction): Friction of this surface material.
- [`ImpactEffects`](/api/Sandbox.Surface/ImpactEffects): Impact effects of this surface material.
- [`Index`](/api/Sandbox.Surface/Index)
- [`NameHash`](/api/Sandbox.Surface/NameHash)
- [`PrefabCollection`](/api/Sandbox.Surface/PrefabCollection): Common prefabs for this surface material
- [`RollingResistance`](/api/Sandbox.Surface/RollingResistance): Controls how easily rolling shapes (sphere, capsule) roll on surfaces.
- [`ScrapeEffects`](/api/Sandbox.Surface/ScrapeEffects): Scrape effects of this surface material.
- [`SoundCollection`](/api/Sandbox.Surface/SoundCollection): Sounds for this surface material
- [`Sounds`](/api/Sandbox.Surface/Sounds): Sounds associated with this surface material.
- [`Tags`](/api/Sandbox.Surface/Tags): A list of tags as one string.

## Methods

- [`FindByName`](/api/Sandbox.Surface/FindByName): Returns a Surface from its name, or null
- [`GetBaseSurface`](/api/Sandbox.Surface/GetBaseSurface): Returns the base surface of this surface, or null if we are the default surface.
- [`HasAllTags`](/api/Sandbox.Surface/HasAllTags): Do we have all the tags on this hitbox?
- [`HasAnyTags`](/api/Sandbox.Surface/HasAnyTags): Do we have all the tags on this hitbox?
- [`HasTag`](/api/Sandbox.Surface/HasTag): Do we have a tag?
- [`PlayCollisionSound`](/api/Sandbox.Surface/PlayCollisionSound): Play a collision sound based on this shape's surface. Can return null if sound is invalid, or too quiet to play.
- [`SetBaseSurface`](/api/Sandbox.Surface/SetBaseSurface): Sets the base surface by name.
