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.
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.
Member Name | Summary |
---|---|
FindByName | Finds a surface by its name. |
Member Name | Summary |
---|---|
GetBaseSurface | Returns the base surface of this surface, or null if we are the default surface. |
SetBaseSurface | Sets the base surface using a name. |
GetRandomGib | Returns a random gib taking into account base surface. |
HasTag | Checks if the surface has a specific tag. |
HasAllTags | Checks if the surface has all specified tags. |
HasAnyTags | Checks if the surface has any of the specified tags. |
NameHash | Hash of the surface name. |
Index | Index of the surface. |
BaseSurface | Filepath of the base surface. Use SetBaseSurface and GetBaseSurface. |
AudioSurface | Defines the audio properties of this surface for Steam Audio. |
Description | A concise description explaining what this surface property should be used for. |
Friction | Friction of this surface material. |
Elasticity | Controls bounciness. |
Density | Density of this surface material. This affects things like automatic mass calculation. Density is in kg/m^3. |
Thickness | If above 0, the object is considered hollow, and its auto generated mass is affected accordingly. Thickness is in inches. |
Dampening | Currently unused and does nothing. TODO: Implement or remove. |
RollingResistance | Controls how easily rolling shapes (sphere, capsule) roll on surfaces. |
BounceThreshold | Velocity threshold, below which objects will not bounce due to their elasticity. |
ImpactEffects | Impact effects of this surface material. |
ScrapeEffects | Scrape effects of this surface material. |
Sounds | Sounds associated with this surface material. |
Breakables | Breakable info for this surface material. |
Tags | A list of tags as one string. |