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.
Constructors1
Showing 1 constructors
public CollisionRules()
No results match this filter.
Methods3
Showing 3 methods
public void Clean()
Remove duplicates etc
Obsolete: This API member is obsolete.
void—public Sandbox.Physics.CollisionRules.Result GetCollisionRule(string left, string right)
Gets the specific collision rule for a pair of tags.
| Parameter | Type | Description |
|---|---|---|
| left | string | — |
| right | string | — |
protected virtual void OnValidate()
void—No results match this filter.
Properties5
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.Collections.Generic.Dictionary`2<Sandbox.Physics.CollisionRules.Pair,Sandbox.Physics.CollisionRules.Result> Sandbox.Physics.CollisionRules.Pairs { get; set; }
What happens when a pair collides
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.
JsonNode—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`.
IEnumerable<string>—public virtual int Sandbox.Physics.CollisionRules.Version { get; set; }
int—No results match this filter.