s&box docs
API ReferenceSandbox.Physics

public class Sandbox.Physics.CollisionRules : Sandbox.ConfigData

This is a JSON serializable description of the physics's collision rules. This allows us to send it to the engine - and store it in a string table (which is networked to the client). You shouldn't really ever have to mess with this, it's just used internally.

Constructors

Showing 1 constructors

Methods

Showing 3 methods

public void Clean()Obsolete

Remove duplicates etc

Obsolete: This API member is obsolete.

public Sandbox.Physics.CollisionRules.Result GetCollisionRule(string left, string right)

Gets the specific collision rule for a pair of tags.

protected virtual void OnValidate()

Properties

Showing 5 properties

public System.Collections.Generic.Dictionary`2<string,Sandbox.Physics.CollisionRules.Result> Sandbox.Physics.CollisionRules.Defaults { get; set; }

If no pair matching is found, this is what we'll use

public System.Text.Json.Nodes.JsonNode Sandbox.Physics.CollisionRules.SerializedPairs { get; set; }

Gets or sets `Sandbox.Physics.CollisionRules.Pairs` in its serialized form for JSON.

public System.Collections.Generic.IEnumerable`1<string> Sandbox.Physics.CollisionRules.Tags { get; set; }

All tags with either an entry in `Sandbox.Physics.CollisionRules.Defaults` or `Sandbox.Physics.CollisionRules.Pairs`.

public virtual int Sandbox.Physics.CollisionRules.Version { get; set; }

Metadata

FieldValue
NamespaceSandbox.Physics
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Physics.CollisionRules

On this page