API Referenceglobal
public sealed struct Capsule
A capsule object, defined by 2 points and a radius. A capsule is a cylinder with round ends (inset half spheres on each end).
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
No results match this filter.
Methods
Showing 3 methods
public bool Contains(Vector3 point)
Determines if the capsule contains the specified point.
public static Capsule FromHeightAndRadius(float height, float radius)
Creates a capsule where Point A is radius units above the ground and Point B is height minus radius units above the ground.
public float GetEdgeDistance(Vector3 localPos)
Calculates the distance from a given point to the edge of the capsule.
Parameters
localPos: Position in the same coordinate space as the capsule
No results match this filter.
Properties
Showing 4 properties
public Vector3 Capsule.RandomPointOnEdge { get; set; }
Returns a random point on the edge of this capsule.
public float Capsule.Volume { get; set; }
Gets the volume of the capsule in cubic units.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:Capsule |