class Surface

in global :: Sandbox

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


public string BaseSurface { get; set; }

Filepath of the base surface. Use SetBaseSurface and GetBaseSurface.

public AudioSurface AudioSurface { get; set; }

Defines the audio properties of this surface for Steam Audio

public string Description { get; set; }

A concise description explaining what this surface property should be used for.

public float Friction { get; set; }

Friction of this surface material.

public float Elasticity { get; set; }

Controls bounciness.

public float Density { get; set; }

Density of this surface material. This affects things like automatic mass calculation. Density is in kg/m^3.

public float Thickness { get; set; }

If above 0, the object is considered hollow, and its auto generated mass is affected accordingly. Thickness is in inches.

public float Dampening { get; set; }

Currently unused and does nothing.

Remarks: TODO: Implement or remove.

public float RollingResistance { get; set; }

Controls how easily rolling shapes (sphere, capsule) roll on surfaces.

public float BounceThreshold { get; set; }

Velocity threshold, below which objects will not bounce due to their elasticity.

public Surface.ImpactEffectData ImpactEffects { get; set; }

Impact effects of this surface material.

public Surface.ScrapeEffectData ScrapeEffects { get; set; }

Scrape effects of this surface material.

public Surface.SoundData Sounds { get; set; }

Sounds associated with this surface material.

public Surface.BreakablesInfo Breakables { get; set; }

Breakable info for this surface material.

public void SetBaseSurface( string name )

Sets the base surface by name.

public static Surface FindByName( string name )

Returns a Surface from its name, or null

  • name The name of a surface property to look up
  • Returns The surface with given name, or null if such surface property doesn't exist

public string Tags { get; set; }

A list of tags as one string.

public bool HasTag( string tag )

Do we have a tag?

public bool HasAllTags( string[] tags )

Do we have all the tags on this hitbox?

  • Returns True if all tags match, false if any tag does not match.

public bool HasAnyTags( string[] tags )

Do we have all the tags on this hitbox?

  • Returns True if any tag matches, false if all tags do not match.

public Type GetType( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public string ResourceName { get; }

😔 No documentation found.

public string ResourcePath { get; }

😔 No documentation found.

public int ResourceId { get; }

😔 No documentation found.

public bool IsValid { get; }

😔 No documentation found.

public void Deserialize( JsonObject jso )

😔 No documentation found.

public void LoadFromJson( string json )

😔 No documentation found.

public Surface( )

😔 No documentation found.

public JsonObject Serialize( )

😔 No documentation found.

public IEnumerable<string> GetReferencedPackages( )

😔 No documentation found.

public void StateHasChanged( )

😔 No documentation found.

public bool HasUnsavedChanges { get; }

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public string GetRandomGib( )

😔 No documentation found.

public Surface GetBaseSurface( )

😔 No documentation found.

public int Index { get; }

😔 No documentation found.

public int ResourceVersion { get; }

😔 No documentation found.

public uint NameHash { get; }

😔 No documentation found.