API reference
API reference
Select your platform
No SDKs available
No versions available

OVRBoundary Class

OVRBoundary provides access to the boundary system, which ensures user safety and offers an uninterrupted experience whenever the user puts on the headset in a new environment.
You can query the geometry and dimension of the boundary, get and set its visiblity status, and test if a tracking node or 3d point is inside the boundary. Please visit Integrate Boundary to learn more about the boundary system.
Note: With Oculus Integration v31 to v57 and Meta XR Core SDK v59 and up, there are some APIs that are deprecated for the OpenXR backend. We strongly discourage you from using the deprecated APIs as we will no longer upgrade or support them. They will continue to remain available for legacy apps and produce compiler warnings.

Methods

GetConfigured ()
Returns true if the boundary system is currently configured with valid boundary data.
Signature
bool GetConfigured()
Returns
bool
GetDimensions ( boundaryType )
Returns a vector that indicates the spatial dimensions of the specified boundary type.
(x = width, y = height, z = depth)
Signature
Vector3 GetDimensions(OVRBoundary.BoundaryType boundaryType)
Parameters
Returns
Vector3
GetGeometry ( boundaryType )
Returns an array of 3d points (in clockwise order) that define the specified boundary type.
All points are returned in local tracking space shared by tracked nodes and accessible through OVRCameraRig's trackingSpace anchor.
Signature
Vector3[] GetGeometry(OVRBoundary.BoundaryType boundaryType)
Parameters
Returns
Vector3[]
GetVisible ()
Returns true if the boundary system is currently visible.
Signature
bool GetVisible()
Returns
bool
SetVisible ( value )
Requests that the boundary system visibility be set to the specified value.
The actual visibility can be overridden by the system (i.e., proximity trigger) or by the user (boundary system disabled)
Signature
void SetVisible(bool value)
Parameters
value: bool
Returns
void
TestNode ( node , boundaryType )
Returns the results of testing a tracked node against the specified boundary type.
All points are returned in local tracking space shared by tracked nodes and accessible through OVRCameraRig's trackingSpace anchor.
Signature
OVRBoundary.BoundaryTestResult TestNode(OVRBoundary.Node node, OVRBoundary.BoundaryType boundaryType)
Parameters
Returns
OVRBoundary.BoundaryTestResult
TestPoint ( point , boundaryType )
Returns the results of testing a 3d point against the specified boundary type.
The test point is expected in local tracking space. All points are returned in local tracking space shared by tracked nodes and accessible through OVRCameraRig's trackingSpace anchor.
Signature
OVRBoundary.BoundaryTestResult TestPoint(Vector3 point, OVRBoundary.BoundaryType boundaryType)
Parameters
point: Vector3
Returns
OVRBoundary.BoundaryTestResult

Inner Struct

BoundaryTestResult Struct

Provides test results of boundary system queries.

Fields

ClosestDistance : float
Signature
float ClosestDistance
ClosestPoint : Vector3
Signature
Vector3 ClosestPoint
ClosestPointNormal : Vector3
Signature
Vector3 ClosestPointNormal
IsTriggering : bool
Signature
bool IsTriggering

Inner Enums

Node Enum

Specifies a tracked node that can be queried through the boundary system.

Enumeration Constants

MemberValue
HandLeft
OVRPlugin.Node.HandLeft
HandRight
OVRPlugin.Node.HandRight
Head
OVRPlugin.Node.Head

BoundaryType Enum

Specifies a boundary type surface.

Enumeration Constants

MemberValue
OuterBoundary
OVRPlugin.BoundaryType.OuterBoundary
PlayArea
OVRPlugin.BoundaryType.PlayArea