Api Sandbox Physics CollisionRules
class

CollisionRules

public class CollisionRules : 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

CollisionRules()

Properties

Name Type Description
Version virtual Int32
Defaults Dictionary<String, Result> If no pair matching is found, this is what we'll use
Pairs Dictionary<Pair, Result> What happens when a pair collides
Tags IEnumerable<String> All tags with either an entry in Defaults or Pairs.
SerializedPairs JsonNode Gets or sets Pairs in its serialized form for JSON.

Methods

Result GetCollisionRule(String left, String right)

Gets the specific collision rule for a pair of tags.

Void Clean()

Remove duplicates etc

Assembly: Sandbox.Engine Namespace: Sandbox.Physics Full Name: Sandbox.Physics.CollisionRules