API ReferenceSandbox.Physics

CollisionRulesclass

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.

objectConfigDataCollisionRules
Namespace
Sandbox.Physics
Assembly
Sandbox.Engine
Declaration
public class Sandbox.Physics.CollisionRules : Sandbox.ConfigData

Constructors1

Showing 1 constructors

Methods3

Showing 3 methods

public void Clean()PUBLICOBSOLETE

Remove duplicates etc

Obsolete: This API member is obsolete.

Returns:void

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

Gets the specific collision rule for a pair of tags.

ParameterTypeDescription
leftstring
rightstring
Returns:Result

protected virtual void OnValidate()PROTECTEDVIRTUAL

Returns:void

Properties5

Showing 5 properties

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

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

Returns:Dictionary<string,Result>

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

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

Returns:JsonNode

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

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

Returns:IEnumerable<string>

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

Returns:int

On this page