s&box docs

public sealed class Sandbox.PhysicsShape

Represents a basic, convex shape. A PhysicsBody consists of one or more of these.

Methods

Showing 11 methods

public bool AddTag(string tag)Obsolete

Add a tag to this shape.

Obsolete: Use Tags

public bool ClearTags()Obsolete

Clear all tags from this shape.

Obsolete: Use Tags

public void DisableAllCollision()

Disable contact, trace and touch

public void EnableAllCollision()

Enable contact, trace and touch

public bool HasTag(string tag)Obsolete

Does this shape have a specific tag?

Obsolete: Use Tags

public void Remove()

Remove this shape. After calling this the shape should be considered released and not used again.

public bool RemoveTag(string tag)Obsolete

Remove a tag from this shape.

Obsolete: Use Tags

public void Triangulate(Vector3[] positions, uint[] indices)

Triangulate this shape.

Properties

Showing 20 properties

public bool Sandbox.PhysicsShape.EnableSolidCollisions { get; set; }

Controls whether this shape has solid collisions.

public bool Sandbox.PhysicsShape.EnableTouch { get; set; }

Controls whether this shape can fire touch events for its owning entity. (Entity.StartTouch, Touch and EndTouch)

public bool Sandbox.PhysicsShape.EnableTouchPersists { get; set; }

Controls whether this shape can fire continuous touch events for its owning entity (i.e. calling Entity.Touch every frame)

public float Sandbox.PhysicsShape.Friction { get; set; }

The friction value

public bool Sandbox.PhysicsShape.IsCapsuleShape { get; set; }

Is this a CapsuleShape

public bool Sandbox.PhysicsShape.IsHeightfieldShape { get; set; }

Is this a HeightfieldShape

public bool Sandbox.PhysicsShape.IsHullShape { get; set; }

Is this a HullShape

public bool Sandbox.PhysicsShape.IsMeshShape { get; set; }

Is this a MeshShape

public bool Sandbox.PhysicsShape.IsSphereShape { get; set; }

Is this a SphereShape

public bool Sandbox.PhysicsShape.IsTrigger { get; set; }

This is a trigger (!)

public Vector3 Sandbox.PhysicsShape.Scale { get; set; }Obsolete

Obsolete: This API member is obsolete.

public string Sandbox.PhysicsShape.SurfaceMaterial { get; set; }

Controls physical properties of this shape.

public Sandbox.Surface[] Sandbox.PhysicsShape.Surfaces { get; set; }

Multiple surfaces referenced by mesh or heightfield collision.

public Vector3 Sandbox.PhysicsShape.SurfaceVelocity { get; set; }

Set the local velocity of the surface so things can slide along it, like a conveyor belt

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.PhysicsShape

On this page

Methodspublic System.Boolean AddTag(System.String tag)public System.Boolean ClearTags()public System.Void DisableAllCollision()public System.Void EnableAllCollision()public System.Boolean HasTag(System.String tag)public System.Void Remove()public System.Boolean RemoveTag(System.String tag)public System.Void Triangulate(Vector3[] positions, System.UInt32[] indices)public System.Void UpdateHull(Vector3 position, Rotation rotation, System.Span`1<Vector3> points)public System.Void UpdateMesh(System.Collections.Generic.List`1<Vector3> vertices, System.Collections.Generic.List`1<System.Int32> indices)public System.Void UpdateMesh(System.Span`1<Vector3> vertices, System.Span`1<System.Int32> indices)Propertiespublic Sandbox.PhysicsBody Sandbox.PhysicsShape.Body { get; set; }public Capsule Sandbox.PhysicsShape.Capsule { get; set; }public Sandbox.Collider Sandbox.PhysicsShape.Collider { get; set; }public System.Boolean Sandbox.PhysicsShape.EnableSolidCollisions { get; set; }public System.Boolean Sandbox.PhysicsShape.EnableTouch { get; set; }public System.Boolean Sandbox.PhysicsShape.EnableTouchPersists { get; set; }public System.Single Sandbox.PhysicsShape.Friction { get; set; }public System.Boolean Sandbox.PhysicsShape.IsCapsuleShape { get; set; }public System.Boolean Sandbox.PhysicsShape.IsHeightfieldShape { get; set; }public System.Boolean Sandbox.PhysicsShape.IsHullShape { get; set; }public System.Boolean Sandbox.PhysicsShape.IsMeshShape { get; set; }public System.Boolean Sandbox.PhysicsShape.IsSphereShape { get; set; }public System.Boolean Sandbox.PhysicsShape.IsTrigger { get; set; }public Vector3 Sandbox.PhysicsShape.Scale { get; set; }public Sandbox.Sphere Sandbox.PhysicsShape.Sphere { get; set; }public Sandbox.Surface Sandbox.PhysicsShape.Surface { get; set; }public System.String Sandbox.PhysicsShape.SurfaceMaterial { get; set; }public Sandbox.Surface[] Sandbox.PhysicsShape.Surfaces { get; set; }public Vector3 Sandbox.PhysicsShape.SurfaceVelocity { get; set; }public Sandbox.ITagSet Sandbox.PhysicsShape.Tags { get; set; }Metadata