public sealed struct BBox
An Axis Aligned Bounding Box.
Related Guides
Broader workflow and conceptual references connected to this API.
Network Visibility controls whether a networked object should be visible for a specific player (Connection). Visibility determines whether the object receives ongoing network updates — such as Sync Vars and Transform updates — for that client.
Scenes can be traced against using Scene.Trace - which uses a builder pattern to make construction a bit easier. At a minimum, traces have a shape, start, and end. You can also filter which specific tags will be hit or ignored, or opt-in to using your project's collision rule matrix by calling WithCollisionRules(tag).
The scope based system works by creating a snapshot of a change set when the scope is entered and another one when the scope is disposed of. The system will automatically take care of restoring the state on undo/redo.
Constructors
Showing 2 constructors
No results match this filter.
Methods
Showing 19 methods
public static BBox FromHeightAndRadius(float height, float radius)
Creates an AABB of `radius` length and depth, and given `height`
public static BBox FromPoints(System.Collections.Generic.IEnumerable`1<Vector3> points, float size = 0)
Parameters
size: Default: 0
public float GetEdgeDistance(Vector3 localPos)
Calculates the shortest distance from the specified local position to the nearest edge of the shape.
public float GetVolume()Obsolete
Get the volume of this AABB
Obsolete: Use BBox.Volume instead.
public BBox Grow(float skin)
Return a slightly bigger box
public bool Overlaps(BBox b)
Returns true if this AABB somewhat overlaps given AABB
public BBox Snap(float distance)
Snap this AABB to a grid
No results match this filter.
Properties
Showing 7 properties
public System.Collections.Generic.IEnumerable`1<Vector3> BBox.Corners { get; set; }
An enumerable that contains all corners of this AABB.
public float BBox.Volume { get; set; }
Returns the physical volume of this AABB.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | global |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:BBox |